Repository navigation
Conversation
Switching presets reparses the config and creates a new fpsLimiter, which always starts at the first fps_limit value. A limit picked with toggle_fps_limit was lost on every toggle_preset press. Carry the limiter's index over when the new preset ends up with the same fps_limit list. A preset with a different fps_limit list still starts at its first value, and reload_cfg still resets as before. Fixes flightlessmango#2065
fxzzi
approved these changes
Nov 8, 2026
fxzzi
left a comment
There was a problem hiding this comment.
was a very minor gripe i had with mangohud, this fixes it. thanks
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.
Closes #2065.
toggle_presetrecreates the fps limiter, so a limit picked withtoggle_fps_limitwent back to the first value. Keep its index when the new preset ends up with the samefps_limitlist; a preset with a different list still starts at its first value, andreload_cfgstill resets.Tested with glxgears,
preset=1,2,fps_limit=30,60: next limit, then next preset gives 30 -> 60 -> 30 on master, 30 -> 60 -> 60 here. Withfps_limit=45in preset 2 both give 30 -> 60 -> 45.