From 26dcf9cb7336744025a3dfaf3e9aea890e93f5a6 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 18 Feb 2024 11:54:11 +0100 Subject: [PATCH] Make the horizontal blanking loops no longer loop eternally. --- src/video/vid_svga.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/vid_svga.c b/src/video/vid_svga.c index 0293ebeda..b298fc4e1 100644 --- a/src/video/vid_svga.c +++ b/src/video/vid_svga.c @@ -797,7 +797,7 @@ svga_recalctimings(svga_t *svga) svga_log("Blank: %04i-%04i, Total: %04i, Mask: %02X\n", svga->hblankstart, svga->hblank_end_val, svga->htotal, eff_mask); - while (1) { + while (adj_dot < (svga->htotal << 1)) { if (dot == svga->htotal) dot = 0; @@ -820,7 +820,7 @@ svga_recalctimings(svga_t *svga) uint32_t eff_mask8514 = 0x0000003f; dev->hblank_sub = 0; - while (1) { + while (adj_dot8514 < (dev->h_total << 1)) { if (dot8514 == dev->h_total) dot = 0;