1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Fix keyDown check, remove debug string from key release timeout

This commit is contained in:
Brian Fiete 2022-01-06 06:28:26 -05:00
parent 54dc59e049
commit 35d82fd599

View file

@ -449,18 +449,18 @@ bool WinBFWindow::CheckKeyReleases(bool isKeyDown)
bool hasKeyDown = false;
uint8 keysDown[256] = { 0 };
::GetKeyboardState((PBYTE)&keysDown);
for (int i = 0; i < 256; i++)
for (int i = 1; i < 256; i++)
if (keysDown[i] & 0x80)
hasKeyDown = true;
if ((hasKeyDown) && (::GetTickCount() - mAwaitKeyReleasesEventTick >= 600))
{
String dbgStr = "CheckKeyReleases timeout. Keys down:";
for (int i = 0; i < 256; i++)
if (keysDown[i] & 0x80)
dbgStr += StrFormat(" %2X", i);
dbgStr += "\n";
OutputDebugStr(dbgStr);
// String dbgStr = "CheckKeyReleases timeout. Keys down:";
// for (int i = 1; i < 256; i++)
// if (keysDown[i] & 0x80)
// dbgStr += StrFormat(" %2X", i);
// dbgStr += "\n";
// OutputDebugStr(dbgStr);
hasKeyDown = false;
}