Skip to content

ignore shift when the game window is not focused - #125

Closed
koltrbtw wants to merge 1 commit into
Tornamic:mainfrom
koltrbtw:upstream/unfocused-input
Closed

koltrbtw wants to merge 1 commit into
Tornamic:mainfrom
koltrbtw:upstream/unfocused-input

Conversation

@koltrbtw

Copy link
Copy Markdown

The game polls GetKeyState(VK_LSHIFT/VK_RSHIFT) every frame (0x747CD0 from CPad::UpdatePads), other keys come as window messages only. With ForegroundApp forced to 1 a minimized or background window still sprinted on SHIFT. The poll now reports it released while the window isn't in the foreground, so nothing gets stuck.

Testing: builds; no video (input of an unfocused window).

@Tornamic Tornamic closed this Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants