Re: [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: Re: [AD] (OS X) mouse button number reported
- From: Evert Glebbeek <eglebbk@xxxxxxxxxx>
- Date: Thu, 18 Sep 2008 22:49:57 -0400
On 18 Sep 2008, at 22:29, Peter Wang wrote:
Hmm? Buttons should be numbered from 1 everywhere, IIRC.
On closer examination, I was wrong about my diagnosis of the bug.
The OS X mouse handler correctly numbers buttons from 1 through 3 and
ex_events does expect button numbers in the range 1 through three -
but the event system reports an event for button 2 rather than button
1, as set by OS X mouse handler.
Will investigate.
It's needed for osx_get_mouse_state, which implements
al_get_mouse_state().
Ah, gotcha.
So b_change should definitely be set when a mouse
button is raised.
The current broken behaviour ought to show up in ex_events.
Actually, it was broken in a more subtle way than I thought: a mouse
down would set the flag, any subsequent mouse event (including
movement) would clear it. I hadn't noticed that because I only tested
clicking without moving (trackpad, in case you were wondering).
This is now fixed though.
Evert