From 76a06fc3c6b69bba77eba660f740a90cdb1b96f8 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 1 Jan 2023 16:01:51 +0200 Subject: [PATCH] Make sure line_start_cycles is CYCLE_UNIT aligned. --- custom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom.cpp b/custom.cpp index 0293e05c..5344a7cc 100644 --- a/custom.cpp +++ b/custom.cpp @@ -11855,7 +11855,7 @@ static void hsync_handlerh(bool onvsync) static void set_hpos(void) { - line_start_cycles = get_cycles(); + line_start_cycles = (get_cycles() + CYCLE_UNIT - 1) & ~(CYCLE_UNIT - 1); maxhposeven_prev = maxhposeven; maxhpos = maxhpos_short + lol; maxhposm1 = maxhpos - 1; -- 2.47.3