fix for possible cursor-related scren corruption
This commit is contained in:
1 parent
0b747ded64
commit
7527c7a220
3 files changed
+48
-10
No files matched your search
@@ -50,6 +50,9 @@ cursor_draw:
|
||||
|
||||
bne cursor_blink_timer_reset // branches always
|
||||
|
||||
|
||||
// XXX code below is probably not 100% safe
|
||||
|
||||
cursor_disable:
|
||||
|
||||
lda #$80
|
||||
@@ -59,23 +62,27 @@ cursor_disable:
|
||||
|
||||
cursor_hide_if_visible:
|
||||
|
||||
// Set countdown to high value, to prevent IRQ interference
|
||||
lda #$FF
|
||||
sta BLNCT
|
||||
|
||||
// If cursor is not visible, nothing to do
|
||||
lda BLNON
|
||||
beq cursor_blink_end
|
||||
beq cursor_blink_timer_reset
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
cursor_undraw:
|
||||
|
||||
// Prevent interrupts from updating cursor
|
||||
lda #0
|
||||
sta BLNON
|
||||
|
||||
jsr screen_get_clipped_PNTR
|
||||
lda GDBLN
|
||||
sta (PNT),y
|
||||
lda GDCOL
|
||||
sta (USER),y
|
||||
|
||||
lda #0
|
||||
sta BLNON
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
cursor_blink_timer_reset:
|
||||
@@ -87,4 +94,5 @@ cursor_blink_timer_reset:
|
||||
// FALLTROUGH
|
||||
|
||||
cursor_blink_end:
|
||||
|
||||
rts
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
|
||||
cursor_show_if_enabled:
|
||||
|
||||
lda BLNSW
|
||||
bne cursor_show_end
|
||||
lda BLNON
|
||||
@@ -36,4 +37,5 @@ cursor_show:
|
||||
// FALLTROUGH
|
||||
|
||||
cursor_show_end:
|
||||
|
||||
rts
|
||||
Reference in new issue
Block a user