Skip to content

Commit

Permalink
only create screenshot if file doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Sep 9, 2024
1 parent ac9d183 commit ed0b829
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/screenshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ BOOL ss_take_screenshot(IDirectDrawSurfaceImpl* src)
strftime(str_time, sizeof(str_time), "%Y-%m-%d_%H-%M-%S", localtime(&t));
_snprintf(filename, sizeof(filename) - 1, "%s%s_%s.png", g_config.screenshot_dir, title, str_time);

if (FILE_EXISTS(filename))
return FALSE;

if (src->bpp == 8 && src->palette)
{
if (!ss_screenshot_8bit(filename, src))
Expand Down

0 comments on commit ed0b829

Please sign in to comment.