mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-08 12:11:51 +09:00
exception on the vm should exit the app
This commit is contained in:
@@ -91,7 +91,13 @@ public class TsvmEmulator {
|
||||
|
||||
appConfig.setWindowedMode(WIDTH, HEIGHT);
|
||||
|
||||
new Lwjgl3Application(new VMEmuExecutableWrapper(VIEWPORT_W, VIEWPORT_H, PANELS_X, PANELS_Y,"assets/"), appConfig);
|
||||
try {
|
||||
new Lwjgl3Application(new VMEmuExecutableWrapper(VIEWPORT_W, VIEWPORT_H, PANELS_X, PANELS_Y, "assets/"), appConfig);
|
||||
}
|
||||
catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
if (Gdx.app != null) Gdx.app.exit();
|
||||
}
|
||||
}
|
||||
|
||||
private static void getDefaultDirectory() {
|
||||
|
||||
@@ -194,7 +194,10 @@ class VMEmuExecutable(val windowWidth: Int, val windowHeight: Int, var panelsX:
|
||||
|
||||
internal fun initVMenv(vm: VM) {
|
||||
val gpu = ReferenceGraphicsAdapter2("./assets", vm)
|
||||
VMSetupBroker.initVMenv(vm, gpu, vmRunners, coroutineJobs)
|
||||
VMSetupBroker.initVMenv(vm, gpu, vmRunners, coroutineJobs) {
|
||||
it.printStackTrace()
|
||||
VMSetupBroker.killVMenv(vm, vmRunners, coroutineJobs)
|
||||
}
|
||||
}
|
||||
|
||||
internal fun killVMenv(vm: VM) {
|
||||
|
||||
Reference in New Issue
Block a user