From 67740303f51ca3e5aa7edb19d1d2760990bf0b0c Mon Sep 17 00:00:00 2001 From: neonloop Date: Sun, 29 Jan 2023 07:37:02 +0000 Subject: Adds dosbox-pure core dosbox-pure does not support resume states, because it loads puremenu before loading game. Savestates can also glitch loaded game. --- funkey/fk_instant_play.c | 7 ++++++- funkey/fk_instant_play.h | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'funkey') diff --git a/funkey/fk_instant_play.c b/funkey/fk_instant_play.c index 638e0fd..aac9091 100644 --- a/funkey/fk_instant_play.c +++ b/funkey/fk_instant_play.c @@ -33,6 +33,7 @@ #include "fk_menu.h" #include "fk_instant_play.h" #include "core.h" +#include "overrides.h" #include "util.h" #ifndef SHELL_CMD_POWERDOWN @@ -40,6 +41,8 @@ #define SHELL_CMD_POWERDOWN_HANDLE "powerdown handle" #endif +#define AUTOSAVE_SLOT 99 + static char *prog_name; int instant_play = 0; @@ -125,7 +128,9 @@ void FK_LoadNewGame(const char *fname) void FK_Autosave(void) { - if (state_allowed()) { + const struct core_override *override = get_overrides(); + + if (state_allowed() && (!override || !(override->prevent_resume))) { int prev_state_slot = state_slot; state_slot = AUTOSAVE_SLOT; state_write(); diff --git a/funkey/fk_instant_play.h b/funkey/fk_instant_play.h index 2ed3c71..d51cc5b 100644 --- a/funkey/fk_instant_play.h +++ b/funkey/fk_instant_play.h @@ -38,7 +38,6 @@ extern "C" { #include -#define AUTOSAVE_SLOT 99 extern int instant_play; extern void FK_InitInstantPlay(int argc, char **argv); -- cgit v1.2.3