From: Toni Wilen Date: Sat, 26 Nov 2022 17:44:12 +0000 (+0200) Subject: vstart == vstop fix X-Git-Tag: 41000~56 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=d0132f64879b7443a5168170af0c7e4a8d85eac6;p=francis%2Fwinuae.git vstart == vstop fix --- diff --git a/custom.cpp b/custom.cpp index 6cc95db7..02389a67 100644 --- a/custom.cpp +++ b/custom.cpp @@ -4520,20 +4520,21 @@ static void vdiw_change(uae_u32 v) vdiwstate_bpl = v != 0; } +/* Take care of the vertical DIW. */ static void decide_vline(void) { bool forceoff = (vb_start_line == 1 && !harddis_v); + bool start = vpos == plffirstline && !forceoff; + // VB start line forces vertical display window off (if HARDDIS=0) + bool end = vpos == plflastline || forceoff; - /* Take care of the vertical DIW. */ - if (vpos == plffirstline && !forceoff) { + if (start && !end) { if (vdiwstate != diw_states::DIW_waiting_stop) { event2_newevent_xx(-1, CYCLE_UNIT, 1, vdiw_change); } vdiwstate = diw_states::DIW_waiting_stop; SET_LINE_CYCLEBASED; - } - // VB start line forces vertical display window off (if HARDDIS=0) - if (vpos == plflastline || forceoff) { + } else if (end) { if (vdiwstate != diw_states::DIW_waiting_start) { event2_newevent_xx(-1, CYCLE_UNIT, 0, vdiw_change); }