Date: Thu, 04 Apr 2002 13:27:36 GMT+1
authorSam Lantinga
Thu, 04 Apr 2002 18:06:33 +0000
changeset 331e9278438fb3b
parent 330 5fed858d551c
child 332 3d6dd1b7b7ba
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.
src/video/ataricommon/SDL_ikbdevents.c
src/video/ataricommon/SDL_xbiosevents.c
     1.1 --- a/src/video/ataricommon/SDL_ikbdevents.c	Wed Apr 03 21:45:25 2002 +0000
     1.2 +++ b/src/video/ataricommon/SDL_ikbdevents.c	Thu Apr 04 18:06:33 2002 +0000
     1.3 @@ -192,10 +192,10 @@
     1.4  			curbutton = SDL_AtariIkbd_mouseb & (1<<i);
     1.5  			prevbutton = atari_prevmouseb & (1<<i);
     1.6  
     1.7 -			if (curbutton & !prevbutton) {
     1.8 +			if (curbutton && !prevbutton) {
     1.9  				SDL_PrivateMouseButton(SDL_PRESSED, atari_GetButton(i), 0, 0);
    1.10  			}
    1.11 -			if (!curbutton & prevbutton) {
    1.12 +			if (!curbutton && prevbutton) {
    1.13  				SDL_PrivateMouseButton(SDL_RELEASED, atari_GetButton(i), 0, 0);
    1.14  			}
    1.15  		}
     2.1 --- a/src/video/ataricommon/SDL_xbiosevents.c	Wed Apr 03 21:45:25 2002 +0000
     2.2 +++ b/src/video/ataricommon/SDL_xbiosevents.c	Thu Apr 04 18:06:33 2002 +0000
     2.3 @@ -126,10 +126,10 @@
     2.4  			curbutton = SDL_AtariXbios_mouseb & (1<<i);
     2.5  			prevbutton = atari_prevmouseb & (1<<i);
     2.6  
     2.7 -			if (curbutton & !prevbutton) {
     2.8 +			if (curbutton && !prevbutton) {
     2.9  				SDL_PrivateMouseButton(SDL_PRESSED, atari_GetButton(i), 0, 0);
    2.10  			}
    2.11 -			if (!curbutton & prevbutton) {
    2.12 +			if (!curbutton && prevbutton) {
    2.13  				SDL_PrivateMouseButton(SDL_RELEASED, atari_GetButton(i), 0, 0);
    2.14  			}
    2.15  		}