Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: getwindowkeyonce #8

Merged
merged 1 commit into from
Jan 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/tbgl_Input.inc
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,13 @@ function Exec_TBGL_GetWindowKeyOnce( ) as long
keyDown = iif(GetAsyncKeyState(eKey), 1, 0)
windowActive = (GetForegroundWindow = ehWnd OR GetForegroundWindow = g_Win.controlParent)

if windowActive and keyDown and keyPressed(eKey) = 0 then
keyPressed(eKey) = 1
function = 1
if windowActive and keyDown then
if keyPressed(eKey) = 0 then
petrSchreiber marked this conversation as resolved.
Show resolved Hide resolved
keyPressed(eKey) = 1
function = 1
else
function = 0
end if
else
keyPressed(eKey) = 0
function = 0
Expand Down