2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 02:27:40 -04:00

Revert "Fixes bug where avatar run-lock state can get confused after alt-tabbing"

This reverts commit 69dac251b6.
This commit is contained in:
rarified
2022-03-09 09:44:05 -07:00
parent 94fab5996f
commit e93db035ba

View File

@ -176,16 +176,19 @@ void plKeyboardDevice::HandleKeyEvent(plOSMsg message, plKeyDef key, bool bKeyDo
if (key == KEY_SHIFT) if (key == KEY_SHIFT)
{ {
fShiftKeyDown = bKeyDown; fShiftKeyDown = bKeyDown;
// return;
} }
if (key == KEY_CTRL) if (key == KEY_CTRL)
{ {
fCtrlKeyDown = bKeyDown; fCtrlKeyDown = bKeyDown;
// return;
} }
if (key == KEY_CAPSLOCK) if (key == KEY_CAPSLOCK)
{ {
if (!bKeyRepeat) // Keyboards toggle the light on key-down, so I'm going with that.
if (bKeyDown && !bKeyRepeat)
{ {
fCapsLockLock = (GetKeyState(KEY_CAPSLOCK) & 1) == 1; fCapsLockLock = !fCapsLockLock;
plAvatarInputInterface::GetInstance()->ForceAlwaysRun(fCapsLockLock); plAvatarInputInterface::GetInstance()->ForceAlwaysRun(fCapsLockLock);
} }
} }
@ -205,8 +208,7 @@ void plKeyboardDevice::HandleWindowActivate(bool bActive, HWND hWnd)
{ {
if (bActive) if (bActive)
{ {
// Refresh the caps lock state fCtrlKeyDown = false;
HandleKeyEvent(KEYDOWN, KEY_CAPSLOCK, nil, false);
} }
else else
{ {