]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Make sure line_start_cycles is CYCLE_UNIT aligned.
authorToni Wilen <twilen@winuae.net>
Sun, 1 Jan 2023 14:01:51 +0000 (16:01 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 1 Jan 2023 14:01:51 +0000 (16:01 +0200)
custom.cpp

index 0293e05c402e0265c2ecf8f1b214dea27fba22e9..5344a7cc5b8f725fdde3fb5f527be5f07d0cc45d 100644 (file)
@@ -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;