static void menu_draw_prep(void)
{
+ plat_video_menu_update();
+
if (menu_w == g_menuscreen_w && menu_h == g_menuscreen_h)
return;
menu_w = g_menuscreen_w, menu_h = g_menuscreen_h;
}
}
+void plat_video_menu_update(void)
+{
+ // w/h might have changed due to resizing
+ plat_sdl_change_video_mode(g_menuscreen_w, g_menuscreen_h, 1);
+ resize_buffers();
+
+ // update pitch as it is needed by the menu bg scaler
+ if (plat_sdl_overlay || plat_sdl_gl_active)
+ g_menuscreen_pp = g_menuscreen_w;
+ else
+ g_menuscreen_pp = plat_sdl_screen->pitch / 2;
+}
+
void plat_video_menu_enter(int is_rom_loaded)
{
if (SDL_MUSTLOCK(plat_sdl_screen))
void plat_video_menu_begin(void)
{
- plat_sdl_change_video_mode(g_menuscreen_w, g_menuscreen_h, 1);
- resize_buffers();
- if (plat_sdl_overlay || plat_sdl_gl_active) {
- g_menuscreen_pp = g_menuscreen_w;
+ plat_video_menu_update(); // just in case
+
+ if (plat_sdl_overlay || plat_sdl_gl_active)
g_menuscreen_ptr = shadow_fb;
- }
else {
if (SDL_MUSTLOCK(plat_sdl_screen))
SDL_LockSurface(plat_sdl_screen);
- g_menuscreen_pp = plat_sdl_screen->pitch / 2;
g_menuscreen_ptr = plat_sdl_screen->pixels;
}
}
}
/* common */
+void plat_video_menu_update(void)
+{
+ // surface is always the screen
+}
+
void plat_video_menu_enter(int is_rom_loaded)
{
if (gp2x_current_bpp != 16 || gp2x_dev_id == GP2X_DEV_WIZ) {
-Subproject commit 9fba90ac323df5d2ad87735f6033ae720e5cb892
+Subproject commit fbbf5e3fc0aff858e206dd98ce4605b960d397cb
\r
g_menubg_src_ptr = realloc(g_menubg_src_ptr, g_screen_height * g_screen_ppitch * 2);\r
memcpy(g_menubg_src_ptr, g_screen_ptr, g_screen_height * g_screen_ppitch * 2);\r
+ g_menubg_src_w = g_screen_width;\r
+ g_menubg_src_h = g_screen_height;\r
+ g_menubg_src_pp = g_screen_ppitch;\r
+\r
currentConfig.scaling = hs, currentConfig.vscaling = vs;\r
}\r
\r
/* do one more frame for menu bg */\r
plat_video_set_shadow(320, 240);\r
pemu_forced_frame(0, 1);\r
- g_menubg_src_w = g_screen_width;\r
- g_menubg_src_h = g_screen_height;\r
- g_menubg_src_pp = g_screen_ppitch;\r
if (ghost_buf) {\r
free(ghost_buf);\r
ghost_buf = NULL;\r
PicoDrawSetOutFormat(PDF_RGB555, 0);\r
}\r
\r
+void plat_video_menu_update(void)\r
+{\r
+}\r
+\r
void plat_video_menu_enter(int is_rom_loaded)\r
{\r
}\r
gsKit_sync(gsGlobal);
}
+/* update surface data */
+void plat_video_menu_update(void)
+{
+ // surface is always the screen
+}
+
/* switch from emulation display to menu display */
void plat_video_menu_enter(int is_rom_loaded)
{
sceDisplayWaitVblankStart();
}
+/* update surface data */
+void plat_video_menu_update(void)
+{
+ // surface is always the screen
+}
+
/* switch from emulation display to menu display */
void plat_video_menu_enter(int is_rom_loaded)
{