From: kub Date: Mon, 19 Dec 2022 22:03:43 +0000 (+0000) Subject: platform, clear status remnants after renderer switching by hotkey X-Git-Tag: v2.00~269 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebd9c86a6cc18cd838c1a8478926c887fc35d03b;p=picodrive.git platform, clear status remnants after renderer switching by hotkey --- 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;