mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-05-22 23:21:29 +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 desktop
|
||||||
if (FlxG.keys.justPressed.ESCAPE)
|
if (FlxG.keys.justPressed.ESCAPE)
|
||||||
{
|
{
|
||||||
Sys.exit(0);
|
openfl.Lib.application.window.close();
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,12 @@ class CrashHandler
|
||||||
{
|
{
|
||||||
trace('Error while handling crash: ' + e);
|
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
|
static function onCriticalError(message:String):Void
|
||||||
|
@ -83,8 +89,9 @@ class CrashHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
#if sys
|
#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.
|
// Exit the game. Since it threw an error, we use a non-zero exit code.
|
||||||
Sys.exit(1);
|
openfl.Lib.application.window.close();
|
||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue