From: notaz Date: Fri, 23 May 2025 19:30:53 +0000 (+0300) Subject: sdl: switch to 16bpp if not in it X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad0282173616786b6352f5419a88755a763d3eb4;p=libpicofe.git sdl: switch to 16bpp if not in it happens on init, where native mode is set for overlay detection to work --- diff --git a/plat_sdl.c b/plat_sdl.c index 582351f..a9a56e8 100644 --- a/plat_sdl.c +++ b/plat_sdl.c @@ -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;