Skip to content

Commit

Permalink
bugfix: GUI would show emulation hasn't started incorrectly when savi…
Browse files Browse the repository at this point in the history
…ng 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.
  • Loading branch information
midwan committed Jan 7, 2025
1 parent bb9dd76 commit 861a243
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/osdep/gui/PanelSavestate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 861a243

Please sign in to comment.