changeset 331:e9278438fb3b

Date: Thu, 04 Apr 2002 13:27:36 GMT+1 From: Patrice Mandin <pmandin@caramail.com> Subject: [SDL][PATCH] Atari mouse patch Just a patch to correct a studid bug where Mouse button events where not generated when pressing first button.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 04 Apr 2002 18:06:33 +0000
parents 5fed858d551c
children 3d6dd1b7b7ba
files src/video/ataricommon/SDL_ikbdevents.c src/video/ataricommon/SDL_xbiosevents.c
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/ataricommon/SDL_ikbdevents.c	Wed Apr 03 21:45:25 2002 +0000
+++ b/src/video/ataricommon/SDL_ikbdevents.c	Thu Apr 04 18:06:33 2002 +0000
@@ -192,10 +192,10 @@
 			curbutton = SDL_AtariIkbd_mouseb & (1<<i);
 			prevbutton = atari_prevmouseb & (1<<i);
 
-			if (curbutton & !prevbutton) {
+			if (curbutton && !prevbutton) {
 				SDL_PrivateMouseButton(SDL_PRESSED, atari_GetButton(i), 0, 0);
 			}
-			if (!curbutton & prevbutton) {
+			if (!curbutton && prevbutton) {
 				SDL_PrivateMouseButton(SDL_RELEASED, atari_GetButton(i), 0, 0);
 			}
 		}
--- a/src/video/ataricommon/SDL_xbiosevents.c	Wed Apr 03 21:45:25 2002 +0000
+++ b/src/video/ataricommon/SDL_xbiosevents.c	Thu Apr 04 18:06:33 2002 +0000
@@ -126,10 +126,10 @@
 			curbutton = SDL_AtariXbios_mouseb & (1<<i);
 			prevbutton = atari_prevmouseb & (1<<i);
 
-			if (curbutton & !prevbutton) {
+			if (curbutton && !prevbutton) {
 				SDL_PrivateMouseButton(SDL_PRESSED, atari_GetButton(i), 0, 0);
 			}
-			if (!curbutton & prevbutton) {
+			if (!curbutton && prevbutton) {
 				SDL_PrivateMouseButton(SDL_RELEASED, atari_GetButton(i), 0, 0);
 			}
 		}