|
Keys get stuck when switching windows with ALT+TAB |
promitheas
Member #23,510
September 2022
|
I am working on a game, and I noticed that when using al_key_down, if I switch windows with alt+tab, allegro will think that I am holding alt down, until I press and release it again. Anyone know anything I can do to fix this? |
torhu
Member #2,727
September 2002
|
What version of Allegro? IIRC, this was fixed many years ago. |
promitheas
Member #23,510
September 2022
|
ALLEGRO_VERSION_STR is 5.2.7, so that's probably the version |
torhu
Member #2,727
September 2002
|
The headers can have a different version from the binaries. You can check the real version by printing what al_get_allegro_version returns. Did you build the binaries yourself? APPEND: |
Edgar Reynaldo
Major Reynaldo
May 2007
|
The event system is preferable to the state system. Look for keyboard events, not states. It doesn't have this problem. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
promitheas
Member #23,510
September 2022
|
Thanks, al_clear_keyboard_state() fixed it. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
#define ing ALLEGRO_UNSTABLE allows you to access the unstable parts of allegro. It is optional. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|