sdl: switch to 16bpp if not in it
authornotaz <notasas@gmail.com>
Fri, 23 May 2025 19:30:53 +0000 (22:30 +0300)
committeririxxxx <31696370+irixxxx@users.noreply.github.com>
Sun, 25 May 2025 20:52:34 +0000 (22:52 +0200)
happens on init, where native mode is set for overlay detection to work

plat_sdl.c

index 582351f..a9a56e8 100644 (file)
@@ -115,7 +115,8 @@ int plat_sdl_change_video_mode(int w, int h, int force)
   }
 
   if (plat_target.vout_method == 0 || (force && (window_w != w || window_h != h
-      || plat_target.vout_fullscreen != old_fullscreen))) {
+      || plat_target.vout_fullscreen != old_fullscreen
+      || !plat_sdl_screen->format || plat_sdl_screen->format->BitsPerPixel != 16))) {
     Uint32 flags = get_screen_flags();
     int win_w = w;
     int win_h = h;