From c8aa1e3fd66433c1b74d586b5edeef23051aa661 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Fri, 13 Feb 2026 20:34:51 +0200 Subject: [PATCH] VGA autoresolution integer scale fix --- drawing.cpp | 6 +++++- od-win32/win32_scaler.cpp | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drawing.cpp b/drawing.cpp index c3a8633c..85c4e036 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -3206,7 +3206,11 @@ static void expand_bplcon1(uae_u16 v) int gethresolution(void) { - return hresolution; + int h = currprefs.gfx_resolution; + if (autoswitch_old_resolution == RES_HIRES && currprefs.gfx_resolution == RES_SUPERHIRES) { + h--; + } + return h; } static void sethresolution(void) diff --git a/od-win32/win32_scaler.cpp b/od-win32/win32_scaler.cpp index 42efaa0b..ae7b6abc 100644 --- a/od-win32/win32_scaler.cpp +++ b/od-win32/win32_scaler.cpp @@ -38,7 +38,6 @@ static bool getmanualpos(int monid, int *cxp, int *cyp, int *cwp, int *chp) struct vidbuf_description *avidinfo = &adisplays[monid].gfxvidinfo; int v, cx, cy, cw, ch; bool native = isnativevidbuf(monid); - int hres = gethresolution(); cx = *cxp; cy = *cyp; @@ -315,7 +314,7 @@ void getfilterdata(int monid, struct displayscale *ds) if (scalemode) { int cw, ch, cx, cy, cv = 0, crealh = 0; - int hres = currprefs.gfx_resolution; + int hres = gethresolution(); int vres = currprefs.gfx_vresolution; static int oxmult, oymult; -- 2.47.3