Tweaks to framerate preference

This commit is contained in:
EliteMasterEric 2024-09-18 03:13:21 -04:00
parent 19e6029fb2
commit 7b7d5deed5
2 changed files with 6 additions and 7 deletions

View file

@ -15,7 +15,7 @@ class Preferences
static function get_framerate():Int
{
#if (web || CHEEMS)
#if web
return 60;
#else
return Save?.instance?.options?.framerate ?? 60;
@ -24,7 +24,7 @@ class Preferences
static function set_framerate(value:Int):Int
{
#if (web || CHEEMS)
#if web
return 60;
#else
var save:Save = Save.instance;

View file

@ -54,11 +54,6 @@ class PreferencesMenu extends Page
*/
function createPrefItems():Void
{
#if !web
createPrefItemNumber('FPS', 'The framerate that the game is running on', function(value:Float) {
Preferences.framerate = Std.int(value);
}, null, Preferences.framerate, 60, 360, 1, 0);
#end
createPrefItemCheckbox('Naughtyness', 'Toggle displaying raunchy content', function(value:Bool):Void {
Preferences.naughtyness = value;
}, Preferences.naughtyness);
@ -82,6 +77,10 @@ class PreferencesMenu extends Page
createPrefItemCheckbox('Unlocked Framerate', 'Enable to unlock the framerate', function(value:Bool):Void {
Preferences.unlockedFramerate = value;
}, Preferences.unlockedFramerate);
#else
createPrefItemNumber('FPS', 'The maximum framerate that the game targets', function(value:Float) {
Preferences.framerate = Std.int(value);
}, null, Preferences.framerate, 30, 300, 5, 0);
#end
}