More GetAsyncKeyState related patches
Jukka Heinonen
jhei at iki.fi
Tue May 15 01:46:51 CDT 2001
After last GetAsyncKeyState patch, GetAsyncKeyState worked
fine for mouse buttons, but not for keyboard. Just noticed that
this is because AsyncKeyStateTable is not updated.
This patch makes keyboard work as well as mouse buttons in
games using GetAsyncKeyState (Torment, Baldur's Gate, Fallout, ...).
Log:
Jukka Heinonen <jhei at iki.fi>
Keyboard events did not update AsyncKeyStateTable, now they do.
Index: input.c
===================================================================
RCS file: /home/wine/wine/windows/input.c,v
retrieving revision 1.46
diff -u -r1.46 input.c
--- input.c 2001/04/18 18:05:57 1.46
+++ input.c 2001/05/15 07:28:02
@@ -133,6 +133,7 @@
if (!(InputKeyStateTable[bVk] & 0x80))
InputKeyStateTable[bVk] ^= 0x01;
InputKeyStateTable[bVk] |= 0x80;
+ AsyncKeyStateTable[bVk] |= 0x80;
message = (InputKeyStateTable[VK_MENU] & 0x80)
&& !(InputKeyStateTable[VK_CONTROL] & 0x80)
@@ -614,7 +615,7 @@
AsyncMouseButtonsStates[2] = 0;
break;
default:
- retval = AsyncKeyStateTable[nKey] |
+ retval = ((AsyncKeyStateTable[nKey] & 0x80) ? 0x0001 : 0) |
((InputKeyStateTable[nKey] & 0x80) ? 0x8000 : 0);
AsyncKeyStateTable[nKey] = 0;
break;
--
Jukka Heinonen <http://www.iki.fi/jhei/>
More information about the wine-patches
mailing list