From 861a2434399c595f5b12a94bbcadc8f43cd687dd Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Tue, 7 Jan 2025 23:24:22 +0100 Subject: [PATCH] bugfix: GUI would show emulation hasn't started incorrectly when saving a state file (fixes #1570) The dialog message "Emulation hasn't started yet" would be incorrectly shown if you also cancelled a warning of unsafe conditions, during the save state message. --- src/osdep/gui/PanelSavestate.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/osdep/gui/PanelSavestate.cpp b/src/osdep/gui/PanelSavestate.cpp index 5eacf118b..0381bbfad 100644 --- a/src/osdep/gui/PanelSavestate.cpp +++ b/src/osdep/gui/PanelSavestate.cpp @@ -102,12 +102,15 @@ class SavestateActionListener : public gcn::ActionListener //------------------------------------------ // Save current state //------------------------------------------ - if (emulating && (!unsafe || unsafe_confirmed)) + if (emulating) { - savestate_initsave(savestate_fname, 1, true, true); - save_state(savestate_fname, "..."); - if (create_screenshot()) - save_thumb(screenshot_filename); + if (!unsafe || unsafe_confirmed) + { + savestate_initsave(savestate_fname, 1, true, true); + save_state(savestate_fname, "..."); + if (create_screenshot()) + save_thumb(screenshot_filename); + } } else {