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--;
}
}
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
}
}