sodium-fabric icon indicating copy to clipboard operation
sodium-fabric copied to clipboard

Adjustable Max FPS by 1

Open PweSol opened this issue 2 years ago • 4 comments

Currently, we can adjust the max fps only by the step of 5. Having the ability to adjust it by 1 is much more useful. For example, it's great if you want to achieve the optimal G-Sync experience (explanation here or here).

PweSol avatar Jan 29 '22 16:01 PweSol

I think if you change line 98 of src/main/java/me/jellysquid/mods/sodium/client/gui/SodiumGameOptionPages.java from .setControl(option -> new SliderControl(option, 5, 260, 5, ControlValueFormatter.fpsLimit())) to .setControl(option -> new SliderControl(option, 5, 260, 1, ControlValueFormatter.fpsLimit())) the step should become 1. It's just changing the third number to whatever you want the step to be.

zaki-hussain avatar Jan 30 '22 20:01 zaki-hussain

It works! Thanks! Only had to disable Sodium version check in Iris to make the game launch with self-compiled builds.

PweSol avatar Feb 01 '22 16:02 PweSol

I hope this becomes the default. FreeSync needs approx. 3 FPS lower than the refresh rate in order to work properly. This would greatly help screen tearing.

Dekamir avatar Feb 24 '22 14:02 Dekamir

Does anyone know how to do this on the latest version? Sodium has been changed quite significantly internally and I can't find anything similar in order to change it. It's now in src/main/java/net/caffeinemc/sodium/config/user/UserConfigCategories.java

PweSol avatar Jun 22 '22 22:06 PweSol

The rejected PR contains rationale why this issue is a wontfix.

MeeniMc avatar May 11 '23 23:05 MeeniMc

We are not going to change this behavior, since vanilla now enforces that the config values are within their defined ranges.

jellysquid3 avatar Jul 22 '23 02:07 jellysquid3