aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneonloop2023-02-02 16:45:50 +0000
committerneonloop2023-02-02 16:45:50 +0000
commitcc1b63c133a82a2af93f31c36dd59205ad3c6501 (patch)
treead8af2188f86c8c005f52df171d67eb17708d2fe
parent1b49088ba05131effde0b26133ecee26ffdd183c (diff)
downloadpicoarch-cc1b63c133a82a2af93f31c36dd59205ad3c6501.tar.gz
picoarch-cc1b63c133a82a2af93f31c36dd59205ad3c6501.tar.bz2
picoarch-cc1b63c133a82a2af93f31c36dd59205ad3c6501.zip
Fixes savestate screenshot and advanced menu background
-rw-r--r--funkey/fk_instant_play.c2
-rw-r--r--funkey/fk_menu.c5
-rw-r--r--plat_sdl.c3
3 files changed, 9 insertions, 1 deletions
diff --git a/funkey/fk_instant_play.c b/funkey/fk_instant_play.c
index 61e41f4..a0d9451 100644
--- a/funkey/fk_instant_play.c
+++ b/funkey/fk_instant_play.c
@@ -34,6 +34,7 @@
#include "fk_instant_play.h"
#include "core.h"
#include "overrides.h"
+#include "plat.h"
#include "util.h"
#ifndef SHELL_CMD_POWERDOWN
@@ -152,6 +153,7 @@ void FK_Resume(void)
if (resume == RESUME_YES) {
resume_slot = AUTOSAVE_SLOT;
}
+ plat_video_menu_leave();
}
}
diff --git a/funkey/fk_menu.c b/funkey/fk_menu.c
index 8028915..1983dd9 100644
--- a/funkey/fk_menu.c
+++ b/funkey/fk_menu.c
@@ -972,6 +972,8 @@ int FK_RunMenu(SDL_Surface *screen)
read_aspect_ratio();
#endif
+ plat_video_menu_enter(1);
+
/// ------ Backup currently displayed app screen -------
background_screen = SDL_CreateRGBSurface(SDL_SWSURFACE,
screen->w, screen->h, 32, 0, 0, 0, 0);
@@ -1479,7 +1481,8 @@ int FK_RunMenu(SDL_Surface *screen)
background_screen = NULL;
}
MENU_DEBUG_PRINTF("Leave Menu\n");
- plat_video_menu_leave();
+ if (returnCode != MENU_RETURN_MENU)
+ plat_video_menu_leave();
return returnCode;
}
diff --git a/plat_sdl.c b/plat_sdl.c
index d938341..398cf1f 100644
--- a/plat_sdl.c
+++ b/plat_sdl.c
@@ -179,6 +179,9 @@ finish:
void plat_video_menu_enter(int is_rom_loaded)
{
+ if (g_menuscreen_ptr)
+ return;
+
SDL_LockSurface(screen);
memcpy(g_menubg_src_ptr, screen->pixels, g_menubg_src_h * g_menubg_src_pp * sizeof(uint16_t));
SDL_UnlockSurface(screen);