From a5a594f619bed1715f3619ed81976a0caef3f8f0 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 11 Dec 2016 10:34:12 +0100 Subject: [PATCH] Don't push screenshot to image history if we are just saving a state --- tasks/task_screenshot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/task_screenshot.c b/tasks/task_screenshot.c index 11e533df29..d80479cac2 100644 --- a/tasks/task_screenshot.c +++ b/tasks/task_screenshot.c @@ -74,6 +74,7 @@ typedef struct unsigned height; int pitch; bool bgr24; + bool silence; void *userbuf; } screenshot_task_state_t; @@ -152,7 +153,7 @@ static void task_screenshot_handler(retro_task_t *task) #endif #ifdef HAVE_IMAGEVIEWER - if (ret) + if (ret && !state->silence) if (content_push_to_history_playlist(g_defaults.image_history, state->filename, "imageviewer", "builtin")) @@ -192,6 +193,7 @@ static bool screenshot_dump( state->pitch = pitch; state->frame = frame; state->userbuf = userbuf; + state->silence = savestate; if (savestate) {