clear screen on shutdown

This commit is contained in:
Djeeberjr 2023-06-30 18:15:02 +02:00
parent d2873d6353
commit 90e76c8cd9
2 changed files with 8 additions and 3 deletions

View File

@ -45,7 +45,7 @@ class Init {
// Register default terminate handler
KernelEvents.instance.onTerminate.handle(_->{
OS.reboot();
KernelEvents.instance.shutdown();
});
Debug.printBuildInfo();

View File

@ -1,7 +1,6 @@
package kernel;
import haxe.MainLoop;
import cc.OS;
import kernel.peripherals.Peripherals.Peripheral;
import kernel.log.Log;
import lib.Pos;
import cc.HTTP.HTTPResponse;
@ -150,6 +149,12 @@ class KernelEvents {
}
public function shutdown() {
// clearing screens
for (screen in Peripheral.instance.getAllScreens()) {
screen.reset();
}
Log.info('Shutting down event loop');
this.stopLoop = true;
MainTerm.instance.reset();