Re: [AD] Bug in pause key

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Victor wrote:
Hi people.

I was programming a game and noted that the pause key was not working
properly. I'm using Allegro 4.2.0 (release version), in windows server
2003.

The problem is that when i press the pause key, testing
'key[KEY_PAUSE]' says that it is pressed, but when i release it,
'key[KEY_PAUSE]' still says it is pressed. The key just go to unpressed
state when i press it again and then release.
Or in other words, instead of saying if it is pressed or not it says if
it is 'on' or 'off' (like the num, caps and scroll lock leds).

From the allegro documentation on "extern volatile char key[KEY_MAX];": "Finally, you may notice an `odd' behaviour of the KEY_PAUSE key. This key only generates an interrupt when it is pressed, not when it is released. For this reason, Allegro pretends the pause key is a `state' key, which is the only way to make it usable."


--
Milan Mimica
http://sparklet.sf.net




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/