From 2be7c7c88d278855aea59b146ff73e10c7330027 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Tue, 14 Jan 2014 13:57:47 +0100 Subject: [PATCH] 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). --- libsrc/atari/mou/atrjoy.s | 11 ++--------- libsrc/atari/mou/atrst.s | 23 ++--------------------- 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/libsrc/atari/mou/atrjoy.s b/libsrc/atari/mou/atrjoy.s index 9915a4ff1..2c2d2c178 100644 --- a/libsrc/atari/mou/atrjoy.s +++ b/libsrc/atari/mou/atrjoy.s @@ -120,12 +120,8 @@ INSTALL: dex bpl @L1 -; Be sure the mouse cursor is invisible and at the default location. We -; need to do that here, because our mouse interrupt handler doesn't set the -; mouse position if it hasn't changed. +; Be sure the mouse cursor is invisible and at the default location. - php - sei jsr CHIDE lda XPos ldx XPos+1 @@ -133,7 +129,6 @@ INSTALL: lda YPos ldx YPos+1 jsr CMOVEY - plp ; Done, return zero (= MOUSE_ERR_OK) @@ -316,7 +311,7 @@ INFO: jsr POS IOCTL: lda #MOUSE_ERR_INV_IOCTL -hlprts: rts + rts ;---------------------------------------------------------------------------- ; IRQ: Irq handler entry point. Called as a subroutine but in IRQ context @@ -339,8 +334,6 @@ IRQ: and #15 ; clear joystick #1 bits eor #15 sta Temp - clc - beq hlprts ; no movement, do nothing jsr CHIDE diff --git a/libsrc/atari/mou/atrst.s b/libsrc/atari/mou/atrst.s index 04580f31a..03f9f0b53 100644 --- a/libsrc/atari/mou/atrst.s +++ b/libsrc/atari/mou/atrst.s @@ -170,11 +170,8 @@ INSTALL: dex bpl @L1 -; Be sure the mouse cursor is invisible and at the default location. We -; need to do that here, because our mouse interrupt handler doesn't set the -; mouse position if it hasn't changed. +; Be sure the mouse cursor is invisible and at the default location. - sei jsr CHIDE lda XPos sta XPosWrk @@ -186,7 +183,6 @@ INSTALL: ldx YPos+1 stx YPosWrk+1 jsr CMOVEY - cli ; Install timer irq routine to poll mouse. @@ -470,22 +466,7 @@ IRQ: ldx #MOUSE_BTN_LEFT @L0: stx Buttons -; Update coordinates if needed - - 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 + ldx visible beq @L1 jsr CHIDE -- 2.39.5