Skip to content

Commit

Permalink
Show '*' in file name when it has changed
Browse files Browse the repository at this point in the history
Will need to make sure this does not affect the performances, since this
work by computing the hash of the image at each frame!
  • Loading branch information
guillaumechereau committed Jan 12, 2024
1 parent da54ebe commit fe313fb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/goxel.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,13 @@ void goxel_release_graphics(void)
static void update_window_title(void)
{
char buf[1024];
sprintf(buf, "Goxel %s%s %s", GOXEL_VERSION_STR, DEBUG ? " (debug)" : "",
bool changed;

changed = image_get_key(goxel.image) != goxel.image->saved_key;
sprintf(buf, "Goxel %s%s %s%s",
GOXEL_VERSION_STR,
DEBUG ? " (debug)" : "",
changed ? "*" : "",
goxel.image->path ?: "");
sys_set_window_title(buf);
}
Expand Down

0 comments on commit fe313fb

Please sign in to comment.