ui, fix for changing SDL emulation display
authorkub <derkub@gmail.com>
Wed, 24 Feb 2021 20:28:53 +0000 (21:28 +0100)
committerkub <derkub@gmail.com>
Thu, 25 Feb 2021 08:41:55 +0000 (09:41 +0100)
platform/common/plat_sdl.c

index 96671f3..2cdb197 100644 (file)
@@ -227,6 +227,9 @@ void plat_video_menu_leave(void)
 
 void plat_video_loop_prepare(void)
 {
+       // take over any new vout settings XXX ask plat_sdl for scaling instead!
+       plat_sdl_change_video_mode(g_menuscreen_w, g_menuscreen_h, 0);
+       // switch over to scaled output if available
        if (plat_sdl_overlay != NULL || plat_sdl_gl_active) {
                g_screen_width = 320;
                g_screen_height = 240;
@@ -238,7 +241,6 @@ void plat_video_loop_prepare(void)
                g_screen_width = g_menuscreen_w;
                g_screen_height = g_menuscreen_h;
                g_screen_ppitch = g_menuscreen_pp;
-               plat_sdl_change_video_mode(g_screen_width, g_screen_height, 0);
                if (SDL_MUSTLOCK(plat_sdl_screen))
                        SDL_LockSurface(plat_sdl_screen);
                g_screen_ptr = plat_sdl_screen->pixels;