From 29ee2e79cff100aeb6535678616e07b1211e3ed3 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Wed, 11 Feb 2026 21:43:11 +0200 Subject: [PATCH] Fix max screen width check --- drawing.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drawing.cpp b/drawing.cpp index f79f0134..a314596f 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -5674,9 +5674,11 @@ static void get_line(int monid, int gfx_ypos, enum nln_how how, int lol_shift_pr } } - if ((denise_pixtotal_max << (1 + hresolution)) > vb->inwidth) { - denise_pixtotal_max = vb->inwidth >> (1 + hresolution); + int maxw = (uae_u32*)xlinebuffer_end - buf1; + if ((denise_pixtotal_max << (1 + hresolution)) > maxw) { + denise_pixtotal_max = maxw >> (1 + hresolution); } + if (xshift > 0) { denise_pixtotal_max -= xshift; } -- 2.47.3