From 38284238e2592f0dfc02ebd2b5969085430c827d Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 4 May 2025 18:50:10 +0300 Subject: [PATCH] make overlay2x kludge controllable through an explicit var 640 width doesn't suit pcsx_rearmed as it's one of widths PSX supports. Note that PicoDrive will need to be updated to set the new variable as needed. --- plat_sdl.c | 3 ++- plat_sdl.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plat_sdl.c b/plat_sdl.c index c2b7bde..773697f 100644 --- a/plat_sdl.c +++ b/plat_sdl.c @@ -27,6 +27,7 @@ SDL_Overlay *plat_sdl_overlay; int plat_sdl_gl_active; void (*plat_sdl_resize_cb)(int w, int h); void (*plat_sdl_quit_cb)(void); +int plat_sdl_no_overlay2x; static char vid_drv_name[32]; static int window_w, window_h, window_b; @@ -115,7 +116,7 @@ int plat_sdl_change_video_mode(int w, int h, int force) if (plat_target.vout_method == vout_mode_overlay || plat_target.vout_method == vout_mode_overlay2x) { - int W = plat_target.vout_method == vout_mode_overlay2x && w < 640 ? 2*w : w; + int W = plat_target.vout_method == vout_mode_overlay2x && !plat_sdl_no_overlay2x ? 2*w : w; plat_sdl_overlay = SDL_CreateYUVOverlay(W, h, SDL_UYVY_OVERLAY, plat_sdl_screen); if (plat_sdl_overlay != NULL && SDL_LockYUVOverlay(plat_sdl_overlay) == 0) { if ((uintptr_t)plat_sdl_overlay->pixels[0] & 3) diff --git a/plat_sdl.h b/plat_sdl.h index 5e6016d..e0513e3 100644 --- a/plat_sdl.h +++ b/plat_sdl.h @@ -5,6 +5,7 @@ extern SDL_Overlay *plat_sdl_overlay; extern int plat_sdl_gl_active; extern void (*plat_sdl_resize_cb)(int w, int h); extern void (*plat_sdl_quit_cb)(void); +extern int plat_sdl_no_overlay2x; int plat_sdl_init(void); int plat_sdl_is_windowed(void); -- 2.39.5