This is a bug fix patch for the problem of Joypad
config GUI in Japanese Windows Environment.
PROBLEM:
In japanese Windows environment, joypad config GUI
doesn't operate correctly.
In about one seconds after a user open the joypad
configuration window, all of the textboxes will be
filled with "Xfer"s. So users are unable to configure
Joypad buttons.
This problem is the most populer FAQ about VBA in
japan. There is a workaround, to disable IME(Japanese
Input Method) and restart VBA, but it is troublesome.
CAUSE:
In japanese Windows environment, DIK_AX(0x96:Xfer)
part of keystate is always treated as DOWN, when a
user get keyboard state with DirectInput.
Current checkKeyboard() treat the DIK_AX as user input
and fills all config as "Xfer".
METHOD TO FIX:
Only changed keys, from previous check, should be
trated as user input.
MODIFIED FILE(s):
DirectInput.cpp : checkKeyboard(),
DirectInput::initialize()
Note:
I also added initialization code of deviceinfo::first
variable for joysticks, which seems to be missed.
@@ -792,6 +803,7 @@
for(int i = 1; i < numDevices; i++) {
pDevices[i].device->SetDataFormat
(&c_dfDIJoystick);
pDevices[i].needed = false;
+ pDevices[i].first = true;
currentDevice = &pDevices[i];
axisNumber = 0;
currentDevice->device->EnumObjects
(EnumAxesCallback, NULL, DIDFT_AXIS);
patch for DirectInput.cpp
joypad config window in VBA1.8beta3, about 1 second after the window open
Logged In: YES
user_id=785003
Thanks !