mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
platform sdl, fix screen clearing if line pitch isn't width
This commit is contained in:
parent
6370b1d401
commit
a1ef15a783
1 changed files with 2 additions and 2 deletions
|
@ -191,7 +191,7 @@ void plat_video_flip(void)
|
|||
g_screen_ptr = plat_sdl_screen->pixels;
|
||||
plat_video_set_buffer(g_screen_ptr);
|
||||
if (clear_buf_cnt) {
|
||||
memset(g_screen_ptr, 0, plat_sdl_screen->w*plat_sdl_screen->h * 2);
|
||||
memset(g_screen_ptr, 0, plat_sdl_screen->pitch*plat_sdl_screen->h);
|
||||
clear_buf_cnt--;
|
||||
}
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ void plat_video_clear_buffers(void)
|
|||
if (plat_sdl_overlay || plat_sdl_gl_active)
|
||||
memset(shadow_fb, 0, g_menuscreen_w * g_menuscreen_h * 2);
|
||||
else {
|
||||
memset(g_screen_ptr, 0, plat_sdl_screen->w*plat_sdl_screen->h * 2);
|
||||
memset(g_screen_ptr, 0, plat_sdl_screen->pitch*plat_sdl_screen->h);
|
||||
clear_buf_cnt = 3; // do it thrice in case of triple buffering
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue