generic, fix debug menu rendering
authorkub <derkub@gmail.com>
Wed, 12 Oct 2022 21:23:49 +0000 (21:23 +0000)
committerkub <derkub@gmail.com>
Wed, 12 Oct 2022 21:23:49 +0000 (21:23 +0000)
platform/common/menu_pico.c
platform/linux/emu.c

index 39c7faf..0994b31 100644 (file)
@@ -1014,6 +1014,10 @@ static void debug_menu_loop(void)
        while (1)
        {
                menu_draw_begin(1, 0);
+               g_screen_ptr = g_menuscreen_ptr;
+               g_screen_width = g_menuscreen_w;
+               g_screen_height = g_menuscreen_h;
+               g_screen_ppitch = g_menuscreen_pp;
                switch (mode)
                {
                        case 0: tmp = PDebugMain();
index ee796f5..2ddf15d 100644 (file)
@@ -365,7 +365,8 @@ void emu_video_mode_change(int start_line, int line_count, int start_col, int co
        out_y = start_line; out_x = start_col;\r
        out_h = line_count; out_w = col_count;\r
 \r
-       plat_video_loop_prepare(); // recalculates g_screen_w/h\r
+       if (! render_bg)\r
+               plat_video_loop_prepare(); // recalculates g_screen_w/h\r
        PicoDrawSetCallbacks(NULL, NULL);\r
        // center output in screen\r
        screen_w = g_screen_width,  screen_x = (screen_w - out_w)/2;\r
@@ -403,7 +404,8 @@ void emu_video_mode_change(int start_line, int line_count, int start_col, int co
                break;\r
        }\r
 \r
-       plat_video_set_size(screen_w, screen_h);\r
+       if (! render_bg)\r
+               plat_video_set_size(screen_w, screen_h);\r
 \r
        if (screen_w < g_screen_width)\r
                screen_x = (g_screen_width  - screen_w)/2;\r