Commit 0db42ad8 authored by Sam Lantinga's avatar Sam Lantinga

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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40332
parent 7bf77c9d
......@@ -192,10 +192,10 @@ void AtariIkbd_PumpEvents(_THIS)
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);
}
}
......
......@@ -126,10 +126,10 @@ void SDL_AtariXbios_PostMouseEvents(_THIS)
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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment