menu widgets: fix screenshot flash tainting the image

This commit is contained in:
natinusala 2019-04-10 16:55:34 +02:00
parent 702c889cd1
commit 942d228e3a
3 changed files with 9 additions and 14 deletions

View File

@ -1926,13 +1926,7 @@ static void menu_widgets_screenshot_fadeout(void *userdata)
menu_animation_push(&entry);
}
void menu_widgets_screenshot_taken(const char *shotname, const char *filename)
{
strlcpy(screenshot_filename, filename, sizeof(screenshot_filename));
strlcpy(screenshot_shotname, shotname, sizeof(screenshot_shotname));
}
void menu_widgets_take_screenshot(void)
static void menu_widgets_play_screenshot_flash(void)
{
menu_animation_ctx_entry_t entry;
@ -1950,6 +1944,14 @@ void menu_widgets_take_screenshot(void)
menu_animation_push(&entry);
}
void menu_widgets_screenshot_taken(const char *shotname, const char *filename)
{
menu_widgets_play_screenshot_flash();
strlcpy(screenshot_filename, filename, sizeof(screenshot_filename));
strlcpy(screenshot_shotname, shotname, sizeof(screenshot_shotname));
}
bool menu_widgets_task_msg_queue_push(retro_task_t *task,
const char *msg,
unsigned prio, unsigned duration,

View File

@ -60,8 +60,6 @@ bool menu_widgets_task_msg_queue_push(retro_task_t *task,
unsigned prio, unsigned duration,
bool flush);
void menu_widgets_take_screenshot(void);
void menu_widgets_screenshot_taken(const char *shotname, const char *filename);
void menu_widgets_start_load_content_animation(const char *content_name, bool remove_extension);

View File

@ -458,11 +458,6 @@ bool take_screenshot(const char *name_base, bool silence, bool has_valid_framebu
bool is_perfcnt_enable = false;
bool ret = false;
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
if (!silence)
menu_widgets_take_screenshot();
#endif
runloop_get_status(&is_paused, &is_idle, &is_slowmotion, &is_perfcnt_enable);
ret = take_screenshot_choice(name_base, silence, is_paused, is_idle,