mirror of
https://github.com/cc65/cc65.git
synced 2025-01-04 23:33:05 +00:00
Always print the mouse cursor, even if coordinates haven't changed.
This makes sure that the cursor is always visible, even if the program has written text to the screen (only valid for non-P/M mouse callbacks).
This commit is contained in:
parent
e85a3f9762
commit
3baf01f531
@ -120,12 +120,8 @@ INSTALL:
|
|||||||
dex
|
dex
|
||||||
bpl @L1
|
bpl @L1
|
||||||
|
|
||||||
; Be sure the mouse cursor is invisible and at the default location. We
|
; Be sure the mouse cursor is invisible and at the default location.
|
||||||
; need to do that here, because our mouse interrupt handler doesn't set the
|
|
||||||
; mouse position if it hasn't changed.
|
|
||||||
|
|
||||||
php
|
|
||||||
sei
|
|
||||||
jsr CHIDE
|
jsr CHIDE
|
||||||
lda XPos
|
lda XPos
|
||||||
ldx XPos+1
|
ldx XPos+1
|
||||||
@ -133,7 +129,6 @@ INSTALL:
|
|||||||
lda YPos
|
lda YPos
|
||||||
ldx YPos+1
|
ldx YPos+1
|
||||||
jsr CMOVEY
|
jsr CMOVEY
|
||||||
plp
|
|
||||||
|
|
||||||
; Done, return zero (= MOUSE_ERR_OK)
|
; Done, return zero (= MOUSE_ERR_OK)
|
||||||
|
|
||||||
@ -316,7 +311,7 @@ INFO: jsr POS
|
|||||||
|
|
||||||
IOCTL: lda #<MOUSE_ERR_INV_IOCTL ; We don't support ioclts for now
|
IOCTL: lda #<MOUSE_ERR_INV_IOCTL ; We don't support ioclts for now
|
||||||
ldx #>MOUSE_ERR_INV_IOCTL
|
ldx #>MOUSE_ERR_INV_IOCTL
|
||||||
hlprts: rts
|
rts
|
||||||
|
|
||||||
;----------------------------------------------------------------------------
|
;----------------------------------------------------------------------------
|
||||||
; IRQ: Irq handler entry point. Called as a subroutine but in IRQ context
|
; IRQ: Irq handler entry point. Called as a subroutine but in IRQ context
|
||||||
@ -339,8 +334,6 @@ IRQ:
|
|||||||
and #15 ; clear joystick #1 bits
|
and #15 ; clear joystick #1 bits
|
||||||
eor #15
|
eor #15
|
||||||
sta Temp
|
sta Temp
|
||||||
clc
|
|
||||||
beq hlprts ; no movement, do nothing
|
|
||||||
|
|
||||||
jsr CHIDE
|
jsr CHIDE
|
||||||
|
|
||||||
|
@ -170,11 +170,8 @@ INSTALL:
|
|||||||
dex
|
dex
|
||||||
bpl @L1
|
bpl @L1
|
||||||
|
|
||||||
; Be sure the mouse cursor is invisible and at the default location. We
|
; Be sure the mouse cursor is invisible and at the default location.
|
||||||
; need to do that here, because our mouse interrupt handler doesn't set the
|
|
||||||
; mouse position if it hasn't changed.
|
|
||||||
|
|
||||||
sei
|
|
||||||
jsr CHIDE
|
jsr CHIDE
|
||||||
lda XPos
|
lda XPos
|
||||||
sta XPosWrk
|
sta XPosWrk
|
||||||
@ -186,7 +183,6 @@ INSTALL:
|
|||||||
ldx YPos+1
|
ldx YPos+1
|
||||||
stx YPosWrk+1
|
stx YPosWrk+1
|
||||||
jsr CMOVEY
|
jsr CMOVEY
|
||||||
cli
|
|
||||||
|
|
||||||
; Install timer irq routine to poll mouse.
|
; Install timer irq routine to poll mouse.
|
||||||
|
|
||||||
@ -470,22 +466,7 @@ IRQ:
|
|||||||
ldx #MOUSE_BTN_LEFT
|
ldx #MOUSE_BTN_LEFT
|
||||||
@L0: stx Buttons
|
@L0: stx Buttons
|
||||||
|
|
||||||
; Update coordinates if needed
|
ldx visible
|
||||||
|
|
||||||
lda XPosWrk
|
|
||||||
cmp XPos
|
|
||||||
bne @Update
|
|
||||||
lda XPosWrk+1
|
|
||||||
cmp XPos+1
|
|
||||||
bne @Update
|
|
||||||
lda YPosWrk
|
|
||||||
cmp YPos
|
|
||||||
bne @Update
|
|
||||||
lda YPosWrk+1
|
|
||||||
cmp YPos+1
|
|
||||||
beq @Done
|
|
||||||
|
|
||||||
@Update:ldx visible
|
|
||||||
beq @L1
|
beq @L1
|
||||||
jsr CHIDE
|
jsr CHIDE
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user