aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorneonloop2021-08-10 00:45:20 +0000
committerneonloop2021-08-10 00:45:20 +0000
commitd9eea627fb916c099e908a9178acd5093e97bfef (patch)
tree40f78b0c95fa2ab45d1ea48d7a78a4269b7b7e2a /main.c
parentebcd69fef4208af05aea6b1f963db1a9613bc470 (diff)
downloadpicoarch-d9eea627fb916c099e908a9178acd5093e97bfef.tar.gz
picoarch-d9eea627fb916c099e908a9178acd5093e97bfef.tar.bz2
picoarch-d9eea627fb916c099e908a9178acd5093e97bfef.zip
Hides state menus if states are unsupported
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 2 insertions, 2 deletions
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;