diff --git a/src/kernel/Init.hx b/src/kernel/Init.hx index e117172..e877f6c 100644 --- a/src/kernel/Init.hx +++ b/src/kernel/Init.hx @@ -1,5 +1,6 @@ package kernel; +import cc.OS; import util.Debug; import kernel.ui.WindowManager; import kernel.peripherals.Peripherals.Peripheral; @@ -13,9 +14,14 @@ class Init { WindowManager.instance = new WindowManager(); MainTerm.instance = new MainTerm(); + Log.init(); Net.instance = new Net(); - Log.init(); + + // Register default terminate handler + KernelEvents.instance.onTerminate.handle(_->{ + OS.reboot(); + }); Debug.printBuildInfo(); }