[AD] Patch for wkeybd.c |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Hello everybody. How are the Allegro community? I was an old Allegro user, and I abandoned a little the library to see other things in Windows. Anyway, I'm back :) And I found a bug with the keyboard handler of Windows. Mainly the state of SHIFT, CTRL and ALT keys in the global variable "key_shifts" aren't working right. I think that the problems is because "GetKeyboardState" is getting an old state of the keyboard (before to process the queue of messages). So using "GetAsyncKeyState" fix the problem. Anyway, I'm not very sure about the cause of the bug. I attached a simple test (bug.c) and a patch for the src/win/wkeybd.c file which fix the problem. Good bye
Attachment:
bug.c
Description: Binary data
Attachment:
wkeybd.c.patch.diff
Description: Binary data
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |