gpu_neon: rework buffering to reduce flickering
[pcsx_rearmed.git] / frontend / plat_sdl.c
index 4e77dc3..c557025 100644 (file)
@@ -147,8 +147,9 @@ void plat_init(void)
   SDL_WM_SetCaption("PCSX-ReARMed " REV, NULL);
 
   shadow_size = g_menuscreen_w * g_menuscreen_h * 2;
-  if (shadow_size < 640 * 512 * 2)
-    shadow_size = 640 * 512 * 2;
+  // alloc enough for double res. rendering
+  if (shadow_size < 1024 * 512 * 2)
+    shadow_size = 1024 * 512 * 2;
 
   shadow_fb = malloc(shadow_size);
   menubg_img = malloc(shadow_size);
@@ -327,6 +328,13 @@ void plat_video_menu_end(void)
 
 void plat_video_menu_leave(void)
 {
+  void *fb = NULL;
+  if (plat_sdl_overlay != NULL || plat_sdl_gl_active)
+    fb = shadow_fb;
+  else if (plat_sdl_screen)
+    fb = plat_sdl_screen->pixels;
+  if (fb)
+    memset(fb, 0, g_menuscreen_w * g_menuscreen_h * 2);
   in_menu = 0;
 }
 
@@ -336,7 +344,7 @@ void *plat_prepare_screenshot(int *w, int *h, int *bpp)
   return 0;
 }
 
-void plat_trigger_vibrate(int is_strong)
+void plat_trigger_vibrate(int pad, int low, int high)
 {
 }