Repository navigation
Fix FPS limit not applying while the window is minimized - #5492
Merged
FileEX merged 1 commit intoOct 7, 2026
Merged
Conversation
GTA keeps ticking while minimized but renders nothing, so Present never ends the frame and the game timer update never waits. End the frame in HandleIdlePulse instead, like the limiter did before multitheftauto#5169.
Collaborator
|
Tested and works. |
This was referenced Oct 5, 2026
FileEX
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
End the frame for the FPS limiter in
CCore::HandleIdlePulsewhile the window is minimized, so the wait inOnGameTimerUpdatekeeps running.Motivation
Fixes #5487
MTA patches out GTA's foreground check (0x748A8D), so the game keeps ticking while minimized. RenderWare's camera begin update fails on
IsIconicthough, so nothing gets rendered andPresentis never called. Alt-tab minimizes the window in both fullscreen modes.Since #5169 the limiter only ran from
Present, and since #5417OnGameTimerUpdateonly waits after aPresentended the frame. Minimized, that never happens, so the game runs uncapped (300-400 FPS in the issue), which also breaks onClientRender FPS counters and speeds up game logic. Before #5169 the limiter ran fromDoPulsePostFrame, whichHandleIdlePulsealready calls while minimized, so this puts that back.Also dropped "minimized" from the
OnFrameEndcomment, the game timer does tick there.Test plan
setFPSLimit(60)or vsync on, runshowframegraph.Checklist