11package funkin .backend .system ;
22
3- import sys .io .File ;
4- import sys .FileSystem ;
53import flixel .addons .transition .FlxTransitionSprite .GraphicTransTileDiamond ;
64import flixel .addons .transition .FlxTransitionableState ;
75import flixel .addons .transition .TransitionData ;
86import flixel .graphics .FlxGraphic ;
97import flixel .math .FlxPoint ;
108import flixel .math .FlxRect ;
119import flixel .system .ui .FlxSoundTray ;
10+ import funkin .backend .assets .AssetSource ;
1211import funkin .backend .assets .AssetsLibraryList ;
1312import funkin .backend .assets .ModsFolder ;
14- import funkin .backend .assets . AssetSource ;
13+ import funkin .backend .system . framerate . Framerate ;
1514import funkin .backend .system .framerate .SystemInfo ;
1615import funkin .backend .system .modules .* ;
1716import funkin .editors .SaveWarning ;
17+ import funkin .options .PlayerSettings ;
1818import openfl .Assets ;
1919import openfl .Lib ;
2020import openfl .display .Sprite ;
2121import openfl .text .TextFormat ;
2222import openfl .utils .AssetLibrary ;
23+ import sys .FileSystem ;
24+ import sys .io .File ;
2325
2426#if ALLOW_MULTITHREADING
2527import sys .thread .Thread ;
@@ -40,7 +42,7 @@ class Main extends Sprite
4042
4143 public static var scaleMode : FunkinRatioScaleMode ;
4244 #if !mobile
43- public static var framerateSprite : funkin.backend.system.framerate. Framerate ;
45+ public static var framerateSprite : Framerate ;
4446 #end
4547
4648 var gameWidth : Int = 1280 ; // Width of the game in pixels (might be less / more in actual pixels).
@@ -79,7 +81,7 @@ class Main extends Sprite
7981 addChild (game = new FunkinGame (gameWidth , gameHeight , MainState , Options .framerate , Options .framerate , skipSplash , startFullscreen ));
8082
8183 #if (!mobile && !web)
82- addChild (framerateSprite = new funkin.backend.system.framerate. Framerate ());
84+ addChild (framerateSprite = new Framerate ());
8385 SystemInfo .init ();
8486 #end
8587 }
@@ -156,6 +158,7 @@ class Main extends Sprite
156158 FlxG .signals .focusGained .add (onFocus );
157159 FlxG .signals .preStateSwitch .add (onStateSwitch );
158160 FlxG .signals .postStateSwitch .add (onStateSwitchPost );
161+ FlxG .signals .postUpdate .add (onUpdate );
159162
160163 FlxG .mouse .useSystemCursor = true ;
161164 #if DARK_MODE_WINDOW
@@ -210,6 +213,14 @@ class Main extends Sprite
210213 scaleMode .resetSize ();
211214 }
212215
216+ public static function onUpdate () {
217+ if (PlayerSettings .solo .controls .DEV_CONSOLE )
218+ NativeAPI .allocConsole ();
219+
220+ if (PlayerSettings .solo .controls .FPS_COUNTER )
221+ Framerate .debugMode = (Framerate .debugMode + 1 ) % 3 ;
222+ }
223+
213224 private static function onStateSwitchPost () {
214225 // manual asset clearing since base openfl one does'nt clear lime one
215226 // does'nt clear bitmaps since flixel fork does it auto
0 commit comments