From d9eea627fb916c099e908a9178acd5093e97bfef Mon Sep 17 00:00:00 2001 From: neonloop Date: Tue, 10 Aug 2021 00:45:20 +0000 Subject: Hides state menus if states are unsupported --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 5fabd58..d399f7a 100644 --- a/main.c +++ b/main.c @@ -207,7 +207,7 @@ void handle_emu_action(emu_action action) if (mmenu) { ShowMenu_t ShowMenu = (ShowMenu_t)dlsym(mmenu, "ShowMenu"); SDL_Surface *screen = SDL_GetVideoSurface(); - MenuReturnStatus status = ShowMenu(content_path, save_template_path, screen, kMenuEventKeyDown); + MenuReturnStatus status = ShowMenu(content_path, state_allowed() ? save_template_path : NULL, screen, kMenuEventKeyDown); if (status==kStatusExitGame) { should_quit = 1; @@ -384,7 +384,7 @@ int main(int argc, char **argv) { if (ResumeSlot) resume_slot = ResumeSlot(); } - if (resume_slot!=-1) { + if (state_allowed() && resume_slot!=-1) { state_slot = resume_slot; state_read(); resume_slot = -1; -- cgit v1.2.3