From: Toni Wilen Date: Sun, 1 Jan 2023 14:01:51 +0000 (+0200) Subject: Make sure line_start_cycles is CYCLE_UNIT aligned. X-Git-Tag: 41010~41 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=76a06fc3c6b69bba77eba660f740a90cdb1b96f8;p=francis%2Fwinuae.git Make sure line_start_cycles is CYCLE_UNIT aligned. --- 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;