|
How to properly handle the keyboard with allegro? |
BrknPhoenix
Member #7,304
June 2006
|
edit: It has been fixed What I do now gets by, but it clearly doesn't handle like a regular keyboard. It misses key presses every so often, and it's highly annoying. I downloaded an allegro game off allegro.cc last night, 3579 or something like that, and it had similar issues where it couldn't keep up with a fast typing user and would mis-read keys. All I'm looking for is to be able to properly handle keyboard input as it regularly is in a windows environment. Can anyone offer some direction? |
A J
Member #3,025
December 2002
|
Quote: How to properly handle the keyboard with allegro the keyboard is a magic device with mysteries powers... you should handle it with great care.. like you handle your woman... oh' i forgot, your an allegro game hacker, you probably dont know about that ___________________________ |
gnolam
Member #2,030
March 2002
|
What are you doing now in your input code? -- |
BrknPhoenix
Member #7,304
June 2006
|
Quote: What are you doing now in your input code? Well, I haven't gotten into the meat of it yet. It's just debug stuff. Here is the call to the function that checks the keys: if (keyboard_needs_poll()) { poll_keyboard(); } if (DEBUG == true) { Debug->CheckKeys(); } and here's the CheckKeys function that is just kinda mangled together. It kinda works but notsomuch, hehe
|
CGamesPlay
Member #2,559
July 2002
|
Check this out: Quote:
if (timer_info == true) { timer_info = false; } else { timer_info = true; }
timer_info = !timer_info;Both snippets do the same. You decide Same applies for the mouse_info variable. -- Ryan Patterson - <http://cgamesplay.com/> |
BrknPhoenix
Member #7,304
June 2006
|
hehe so they do :p thanks for the shortcut |
|