clear screen on shutdown
This commit is contained in:
parent
d2873d6353
commit
90e76c8cd9
@ -45,7 +45,7 @@ class Init {
|
||||
|
||||
// Register default terminate handler
|
||||
KernelEvents.instance.onTerminate.handle(_->{
|
||||
OS.reboot();
|
||||
KernelEvents.instance.shutdown();
|
||||
});
|
||||
|
||||
Debug.printBuildInfo();
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user