Skip to content

Commit

Permalink
missed a spot
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryiuu04 committed Jul 20, 2024
1 parent 760bd0c commit df4093e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 7 additions & 0 deletions source/backend/ClientPrefs.hx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ class ClientPrefs {
}

public static function loadPrefs() {
if(FlxG.save.data.fpsCap == null && FlxG.save.data.framerate == null) {
var framerate = 120;
FlxG.save.data.framerate = framerate;
FlxG.save.data.fpsCap = framerate;
FlxG.save.flush();
}

// values I couldn't add to the array since they have different save data names and var names
if(FlxG.save.data.fps != null) {
data.showFPS = FlxG.save.data.fps;
Expand Down
2 changes: 1 addition & 1 deletion source/backend/KadeEngineData.hx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,6 @@ class KadeEngineData

Main.watermarks = FlxG.save.data.watermark;

(cast (Lib.current.getChildAt(0), Main)).setFPSCap(FlxG.save.data.fpsCap);
//(cast (Lib.current.getChildAt(0), Main)).setFPSCap(FlxG.save.data.fpsCap);
}
}
5 changes: 1 addition & 4 deletions source/states/TitleState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ class TitleState extends MusicBeatState
{
trace("Loaded " + openfl.Assets.getLibrary("default").assetsLoaded + " assets (DEFAULT)");
}

openfl.Lib.current.stage.frameRate = 120;//oop
Main.curFPS = Std.int(120);//sie.


backend.PlayerSettings.init();

#if windows
Expand Down

0 comments on commit df4093e

Please sign in to comment.