[AD] (OS X) mouse button number reported |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: [AD] (OS X) mouse button number reported
- From: Evert Glebbeek <eglebbk@xxxxxxxxxx>
- Date: Thu, 18 Sep 2008 20:50:02 -0400
As I mentioned previously, when I ran ex_events, the display would
show the right mouse button lighting up when I clicked (with the one
button I have). Investigating, there seems to be an inconsistency
between how _al_osx_mouse_generate_event numbers the buttons starting
from 1 and the way ex_events expects them to be ordered starting from 0.
Assuming that's also how they're numbered on other platforms, the
attached patch fixes the problem. Please confirm that this is correct
(although Peter Wang already more or less did that when he said the
primary mouse button should highlight the left box).
On a related issue, the same chunk of code in qzmouse records the
change in a variable b_change, which is then used to set
osx_mouse.state.buttons, which doesn't seem to be used again anywhere
else (according to grep). However, b_change is only set when the key
state changes to "down". Should this be fixed, or can the
osx_mouse.state.buttons part be removed completely?
Evert
Attachment:
qzmouse.diff
Description: Binary data