From: Toni Wilen Date: Wed, 27 Mar 2024 18:12:27 +0000 (+0200) Subject: Fix bitplane corruption in some weird modes X-Git-Tag: 5300~68 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=17d74d661dd5fb312e71d1ba369f382a8b3b650c;p=francis%2Fwinuae.git Fix bitplane corruption in some weird modes --- diff --git a/custom.cpp b/custom.cpp index e4525dc7..4d0e8536 100644 --- a/custom.cpp +++ b/custom.cpp @@ -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