forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
14
Kha/Backends/Kinc-hxcpp/khacpp/tools/hxcpp/Tools.hx
Normal file
14
Kha/Backends/Kinc-hxcpp/khacpp/tools/hxcpp/Tools.hx
Normal file
@ -0,0 +1,14 @@
|
||||
class Tools {
|
||||
private static var onExit:Array<Int->Void> = [];
|
||||
|
||||
public static function addOnExitHook(fn:Int->Void) {
|
||||
onExit.push(fn);
|
||||
}
|
||||
|
||||
public static function exit(exitCode:Int) {
|
||||
for (hook in onExit) {
|
||||
hook(exitCode);
|
||||
}
|
||||
Sys.exit(exitCode);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user