From ebd9c86a6cc18cd838c1a8478926c887fc35d03b Mon Sep 17 00:00:00 2001 From: kub Date: Mon, 19 Dec 2022 22:03:43 +0000 Subject: [PATCH] platform, clear status remnants after renderer switching by hotkey --- platform/gp2x/emu.c | 7 ++++++- platform/linux/emu.c | 1 + platform/psp/emu.c | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/platform/gp2x/emu.c b/platform/gp2x/emu.c index 9546bcd1..1540d81b 100644 --- a/platform/gp2x/emu.c +++ b/platform/gp2x/emu.c @@ -606,6 +606,12 @@ static void vid_reset_mode(void) gp2x_video_changemode(gp2x_mode, Pico.m.pal); + // clear whole screen in all buffers + if (!is_16bit_mode()) + gp2x_memset_all_buffers(0, 0xe0, 320*240); + else + gp2x_memset_all_buffers(0, 0, 320*240*2); + Pico.m.dirtyPal = 1; // palette converters for 8bit modes @@ -657,7 +663,6 @@ void emu_video_mode_change(int start_line, int line_count, int start_col, int co gp2x_video_RGB_setscaling(ln_offs, scalex, scaley); - // clear whole screen in all buffers if (!is_16bit_mode()) gp2x_memset_all_buffers(0, 0xe0, 320*240); diff --git a/platform/linux/emu.c b/platform/linux/emu.c index 2ddf15d8..746109b4 100644 --- a/platform/linux/emu.c +++ b/platform/linux/emu.c @@ -244,6 +244,7 @@ static void apply_renderer(void) void plat_video_toggle_renderer(int change, int is_menu) { change_renderer(change); + plat_video_clear_buffers(); if (!is_menu) { apply_renderer(); diff --git a/platform/psp/emu.c b/platform/psp/emu.c index 7868bf79..3e9e66ef 100644 --- a/platform/psp/emu.c +++ b/platform/psp/emu.c @@ -741,6 +741,7 @@ void pemu_forced_frame(int no_scale, int do_emu) void plat_video_toggle_renderer(int change, int is_menu_call) { change_renderer(change); + clearArea(1); if (is_menu_call) return; -- 2.39.5