Skip to content

Commit

Permalink
bugfix: ensure screenshot is generated even when using Quick Save State
Browse files Browse the repository at this point in the history
- When using the shortcuts for Quick Save state (END + SHIFT + numpad key), no screenshot was generated.
  • Loading branch information
midwan committed Jan 5, 2025
1 parent e7dd713 commit 1800911
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/osdep/gui/gui_handling.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,6 @@ extern void new_harddrive(int entry);

extern void inithdcontroller(int ctype, int ctype_unit, int devtype, bool media);

extern std::string screenshot_filename;
extern int current_state_num;
extern int delay_savestate_frame;
extern int last_x;
Expand Down
1 change: 1 addition & 0 deletions src/osdep/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ extern int mouseactive;
extern int minimized;
extern int monitor_off;
extern bool joystick_refresh_needed;
extern std::string screenshot_filename;

extern void logging_init();

Expand Down
4 changes: 4 additions & 0 deletions src/savestate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1348,6 +1348,10 @@ void savestate_quick(int slot, int save)
savestate_flags |= SAVESTATE_NODIALOGS;
savestate_flags |= SAVESTATE_ALWAYSUSEPATH;
save_state (savestate_fname, _T(""));
#ifdef AMIBERRY
if (create_screenshot())
save_thumb(screenshot_filename);
#endif
} else {
if (!zfile_exists (savestate_fname)) {
write_log (_T("staterestore, file '%s' not found\n"), savestate_fname);
Expand Down

0 comments on commit 1800911

Please sign in to comment.