mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-21 22:33:26 +00:00
Fix window not closing when specified
This commit is contained in:
parent
bc546e86aa
commit
0d60929f18
|
@ -271,7 +271,7 @@ class TitleState extends MusicBeatState
|
|||
#if desktop
|
||||
if (FlxG.keys.justPressed.ESCAPE)
|
||||
{
|
||||
Sys.exit(0);
|
||||
openfl.Lib.application.window.close();
|
||||
}
|
||||
#end
|
||||
|
||||
|
|
|
@ -61,6 +61,12 @@ class CrashHandler
|
|||
{
|
||||
trace('Error while handling crash: ' + e);
|
||||
}
|
||||
|
||||
#if sys
|
||||
Sys.sleep(1); // wait a few moments of margin to process.
|
||||
// Exit the game. Since it threw an error, we use a non-zero exit code.
|
||||
openfl.Lib.application.window.close();
|
||||
#end
|
||||
}
|
||||
|
||||
static function onCriticalError(message:String):Void
|
||||
|
@ -83,8 +89,9 @@ class CrashHandler
|
|||
}
|
||||
|
||||
#if sys
|
||||
Sys.sleep(1); // wait a few moments of margin to process.
|
||||
// Exit the game. Since it threw an error, we use a non-zero exit code.
|
||||
Sys.exit(1);
|
||||
openfl.Lib.application.window.close();
|
||||
#end
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue