Files
LNXSDK/Kha/Backends/Kore-hxcpp/khacpp/tools/hxcpp/Tools.hx
2026-05-22 11:54:15 -07:00

15 lines
278 B
Haxe

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);
}
}