Mercurial > sdl-ios-xcode
comparison src/video/ataricommon/SDL_xbiosevents.c @ 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 | 9c6613983e85 |
children | b8d311d90021 |
comparison
equal
deleted
inserted
replaced
330:5fed858d551c | 331:e9278438fb3b |
---|---|
124 int curbutton, prevbutton; | 124 int curbutton, prevbutton; |
125 | 125 |
126 curbutton = SDL_AtariXbios_mouseb & (1<<i); | 126 curbutton = SDL_AtariXbios_mouseb & (1<<i); |
127 prevbutton = atari_prevmouseb & (1<<i); | 127 prevbutton = atari_prevmouseb & (1<<i); |
128 | 128 |
129 if (curbutton & !prevbutton) { | 129 if (curbutton && !prevbutton) { |
130 SDL_PrivateMouseButton(SDL_PRESSED, atari_GetButton(i), 0, 0); | 130 SDL_PrivateMouseButton(SDL_PRESSED, atari_GetButton(i), 0, 0); |
131 } | 131 } |
132 if (!curbutton & prevbutton) { | 132 if (!curbutton && prevbutton) { |
133 SDL_PrivateMouseButton(SDL_RELEASED, atari_GetButton(i), 0, 0); | 133 SDL_PrivateMouseButton(SDL_RELEASED, atari_GetButton(i), 0, 0); |
134 } | 134 } |
135 } | 135 } |
136 atari_prevmouseb = SDL_AtariXbios_mouseb; | 136 atari_prevmouseb = SDL_AtariXbios_mouseb; |
137 } | 137 } |