gui: make max FPS slider dynamic based on monitor refresh rate#3807
Open
eyadmkv wants to merge 3 commits into
Open
gui: make max FPS slider dynamic based on monitor refresh rate#3807eyadmkv wants to merge 3 commits into
eyadmkv wants to merge 3 commits into
Conversation
Fixes CaffeineMC#3781: Automatically calculate the slider's upper bound based on the current monitor's refresh rate, removing the static hardcoded cap and providing better support for high-refresh-rate displays.
douira
requested changes
Jul 6, 2026
Refactor the framerate limit calculation to be dynamic rather than static by extracting the refresh rate probing to getMaxFramerateLimit and utilizing setValidatorProvider; the FPS bounds now update in response to live state changes, mirroring the implementation used for gui_scale. Additionally: - Restore the accidentally removed Graphics API option group. - Revert setValueFormatter to ControlValueFormatterImpls.fpsLimit(). - Added imports.
Author
|
Hi @douira, thank you again for the feedback. I have pushed an update addressing the points you raised, I hope they meet your expectations! |
douira
requested changes
Jul 6, 2026
| ); | ||
| generalPage.addOptionGroup(builder.createOptionGroup().addOption(builder.createEnumOption(Identifier.fromNamespaceAndPath("sodium", "general.graphics_api"), | ||
| PreferredGraphicsApi.class) | ||
| PreferredGraphicsApi.class) |
Author
|
Tell me if there's something wrong, I'm happy to learn from you! |
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.
Fixes #3781: Automatically calculate the slider's upper bound based on the current monitor's refresh rate, removing the static hardcoded cap and providing better support for high-refresh-rate displays