mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 04:52:21 +02:00
Fix keyDown check, remove debug string from key release timeout
This commit is contained in:
parent
54dc59e049
commit
35d82fd599
1 changed files with 7 additions and 7 deletions
|
@ -449,18 +449,18 @@ bool WinBFWindow::CheckKeyReleases(bool isKeyDown)
|
||||||
bool hasKeyDown = false;
|
bool hasKeyDown = false;
|
||||||
uint8 keysDown[256] = { 0 };
|
uint8 keysDown[256] = { 0 };
|
||||||
::GetKeyboardState((PBYTE)&keysDown);
|
::GetKeyboardState((PBYTE)&keysDown);
|
||||||
for (int i = 0; i < 256; i++)
|
for (int i = 1; i < 256; i++)
|
||||||
if (keysDown[i] & 0x80)
|
if (keysDown[i] & 0x80)
|
||||||
hasKeyDown = true;
|
hasKeyDown = true;
|
||||||
|
|
||||||
if ((hasKeyDown) && (::GetTickCount() - mAwaitKeyReleasesEventTick >= 600))
|
if ((hasKeyDown) && (::GetTickCount() - mAwaitKeyReleasesEventTick >= 600))
|
||||||
{
|
{
|
||||||
String dbgStr = "CheckKeyReleases timeout. Keys down:";
|
// String dbgStr = "CheckKeyReleases timeout. Keys down:";
|
||||||
for (int i = 0; i < 256; i++)
|
// for (int i = 1; i < 256; i++)
|
||||||
if (keysDown[i] & 0x80)
|
// if (keysDown[i] & 0x80)
|
||||||
dbgStr += StrFormat(" %2X", i);
|
// dbgStr += StrFormat(" %2X", i);
|
||||||
dbgStr += "\n";
|
// dbgStr += "\n";
|
||||||
OutputDebugStr(dbgStr);
|
// OutputDebugStr(dbgStr);
|
||||||
hasKeyDown = false;
|
hasKeyDown = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue