-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Pause rendering when the window is minimized #18670
Conversation
Before I start debugging, have you verified that this works as expected on windows? A quick test on macOS shows that the rendering never restarts after unminimizing the window. Audio works, but the rendering remains frozen on the last frame before minimizing. |
Of course. This must be some more macOS weirdness, maybe similar to
|
@pchote did you have any luck looking into this or can give me any hints? |
Oops, I forgot about this. Please remind me to look into this on the weekend. |
I tested this on Linux. No regressions, but I am also not sure if it actually pauses the renderer. I run OpenRA in window mode. |
368daf6
to
2e8061a
Compare
Rebased and updated. I simply disabled this for OSX now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After fixing the events on macOS this has a nice sideeffect of working around the bug where minimized windows don't trigger on vsync, meaning that OpenRA renders at huge FPS eating all your CPU and GPU resources while minimized (not that anybody ever actually uses minimise on macOS...).
nit: the comment and PR messages say "Only render the game when the window is maximized" which implies that it doesn't render during regular non-maximized use. Change to "Pause rendering when the window is minimized"? |
Works on Win10 |
Updated. |
Closes #18354.
Split from #17837.
Still renders when the window just loses focus.