fix: the display stays on while playing with a controller (#1532) #1538
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!1538
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/display-awake"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1532. Windows doesn't count controller input as user input, so playing with a controller, the display went off at the power plan's timeout. The game already blocked the screensaver, but not the display's power-off.
While the game's window is in front and not minimized, the display's idle timer is now reset every 30 s with
SetThreadExecutionState(ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED). WithoutES_CONTINUOUS, nothing is held once the game is left, minimized or closed: Windows' own timers simply resume.HOS_KEEP_DISPLAY=0turns it off. It runs on the window's existing 250 ms timer.Tested: compiles cleanly with
-Wall -Wextra.🤖 Generated with Claude Code
still happening for me this morning after updating to current, but admittedly didn't do a ton of testing. not sure what else it could be, i have a pretty default windows install and haven't changed any power save settings etc... I'll check again tonight.