Mercurial > sdl-ios-xcode
comparison src/video/ataricommon/SDL_ikbdevents.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 | f6ffac90895c |
children | b8d311d90021 |
comparison
equal
deleted
inserted
replaced
330:5fed858d551c | 331:e9278438fb3b |
---|---|
190 int curbutton, prevbutton; | 190 int curbutton, prevbutton; |
191 | 191 |
192 curbutton = SDL_AtariIkbd_mouseb & (1<<i); | 192 curbutton = SDL_AtariIkbd_mouseb & (1<<i); |
193 prevbutton = atari_prevmouseb & (1<<i); | 193 prevbutton = atari_prevmouseb & (1<<i); |
194 | 194 |
195 if (curbutton & !prevbutton) { | 195 if (curbutton && !prevbutton) { |
196 SDL_PrivateMouseButton(SDL_PRESSED, atari_GetButton(i), 0, 0); | 196 SDL_PrivateMouseButton(SDL_PRESSED, atari_GetButton(i), 0, 0); |
197 } | 197 } |
198 if (!curbutton & prevbutton) { | 198 if (!curbutton && prevbutton) { |
199 SDL_PrivateMouseButton(SDL_RELEASED, atari_GetButton(i), 0, 0); | 199 SDL_PrivateMouseButton(SDL_RELEASED, atari_GetButton(i), 0, 0); |
200 } | 200 } |
201 } | 201 } |
202 atari_prevmouseb = SDL_AtariIkbd_mouseb; | 202 atari_prevmouseb = SDL_AtariIkbd_mouseb; |
203 } | 203 } |