From 459e9fa8d1cffa992d1aab200b347b68741d98e9 Mon Sep 17 00:00:00 2001 From: Yoshman29 <81191621+YoshiCrafter29@users.noreply.github.com> Date: Sun, 2 Apr 2023 15:35:24 +0200 Subject: [PATCH] Update Main.hx --- source/funkin/system/Main.hx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/funkin/system/Main.hx b/source/funkin/system/Main.hx index e693686e..b8590fb3 100644 --- a/source/funkin/system/Main.hx +++ b/source/funkin/system/Main.hx @@ -41,6 +41,9 @@ class Main extends Sprite public static var forceGPUOnlyBitmapsOff:Bool = false; public static var scaleMode:FunkinRatioScaleMode; + #if !mobile + public static var framerateSprite:funkin.system.framerate.Framerate; + #end var gameWidth:Int = 1280; // Width of the game in pixels (might be less / more in actual pixels depending on your zoom). var gameHeight:Int = 720; // Height of the game in pixels (might be less / more in actual pixels depending on your zoom). @@ -103,12 +106,11 @@ class Main extends Sprite gameHeight = Math.ceil(stageHeight / zoom); } - - stage.scaleX = stage.scaleY = stage.window.scale; addChild(game = new FunkinGame(gameWidth, gameHeight, MainState, zoom, framerate, framerate, skipSplash, startFullscreen)); #if !mobile - addChild(new funkin.system.framerate.Framerate()); + addChild(framerateSprite = new funkin.system.framerate.Framerate()); + framerateSprite = stage.window.scale; SystemInfo.init(); #end }