]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix bitplane corruption in some weird modes
authorToni Wilen <twilen@winuae.net>
Wed, 27 Mar 2024 18:12:27 +0000 (20:12 +0200)
committerToni Wilen <twilen@winuae.net>
Wed, 27 Mar 2024 18:12:27 +0000 (20:12 +0200)
custom.cpp

index e4525dc7e3d7b7de1a1415906cf4d15b4f7b1361..4d0e8536db58823a103e97bc1c5cce0fcf82d2ca 100644 (file)
@@ -1934,17 +1934,15 @@ static void end_estimate_last_fetch_cycle(int hpos)
        if (estimated_cycles_empty != estimated_cycles) {
                estimated_cycles = estimated_cycles_empty;
                estimate_cycles_empty_index = hpos;
-               uae_s8 *est = NULL;
+               uae_s8 *est = maxhposeven ? estimated_cycles_buf1 : estimated_cycles_buf0;
                if (maxhpos == estimated_maxhpos[0]) {
                        est = estimated_cycles_buf0;
                } else if (maxhpos == estimated_maxhpos[1]) {
                        est = estimated_cycles_buf1;
                }
-               if (est) {
-                       for (int i = 0; i < RGA_PIPELINE_ADJUST; i++) {
-                               int pos = (hpos + i) % maxhpos;
-                               estimated_cycles_empty[pos] = est[pos];
-                       }
+               for (int i = 0; i < RGA_PIPELINE_ADJUST; i++) {
+                       int pos = (hpos + i) % maxhpos;
+                       estimated_cycles_empty[pos] = est[pos];
                }
        }
 #else