]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix doublescan mode corruption.
authorToni Wilen <twilen@winuae.net>
Wed, 29 Aug 2018 17:52:27 +0000 (20:52 +0300)
committerToni Wilen <twilen@winuae.net>
Wed, 29 Aug 2018 17:52:27 +0000 (20:52 +0300)
custom.cpp
drawing.cpp

index dd28e26a761a9fc75a4eca31f4a6252cc80e98bb..57527aba3670fb8f1c4ddcd4fc26564c8d663174 100644 (file)
@@ -9618,13 +9618,15 @@ static void hsync_handler_post (bool onvsync)
        }
        if (diw_change == 0) {
                if (vpos >= first_planes_vpos && vpos <= last_planes_vpos) {
-                       if (diwlastword > diwlastword_total) {
-                               diwlastword_total = diwlastword;
+                       int diwlastword_lores = diwlastword;
+                       int diwfirstword_lores = diwfirstword;
+                       if (diwlastword_lores > diwlastword_total) {
+                               diwlastword_total = diwlastword_lores;
                                if (diwlastword_total > coord_diw_lores_to_window_x(hsyncstartpos * 2))
                                        diwlastword_total = coord_diw_lores_to_window_x(hsyncstartpos * 2);
                        }
-                       if (diwfirstword < diwfirstword_total) {
-                               diwfirstword_total = diwfirstword;
+                       if (diwfirstword_lores < diwfirstword_total) {
+                               diwfirstword_total = diwfirstword_lores;
                                if (diwfirstword_total < coord_diw_lores_to_window_x(hsyncendpos * 2))
                                        diwfirstword_total = coord_diw_lores_to_window_x(hsyncendpos * 2);
                                firstword_bplcon1 = bplcon1;
index 65dcefe8f6864b2fcd21ab6d8b35b2f982c4572b..f081441d2b9c19af7d668ffb7cd42771acda1f96 100644 (file)
@@ -90,10 +90,12 @@ static void lores_reset (void)
        lores_factor = currprefs.gfx_resolution ? 2 : 1;
        lores_set(currprefs.gfx_resolution);
        if (doublescan > 0) {
-               if (lores_shift < 2)
-                       lores_shift++;
+               int ls = lores_shift;
+               if (ls < 2) {
+                       ls++;
+               }
                lores_factor = 2;
-               lores_set(lores_shift);
+               lores_set(ls);
        }
        sprite_buffer_res = currprefs.gfx_resolution;
        if (doublescan > 0 && sprite_buffer_res < RES_SUPERHIRES)