shotdown everything more clean
This commit is contained in:
parent
72069e725b
commit
82757b7a93
@ -57,12 +57,19 @@ class fenrir():
|
|||||||
def captureSignal(self, siginit, frame):
|
def captureSignal(self, siginit, frame):
|
||||||
self.shutdownRequest()
|
self.shutdownRequest()
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
self.environment['runtime']['outputManager'].presentText(self.environment, "Quit Fenrir", soundIcon='ScreenReaderOff', interrupt=True)
|
self.environment['runtime']['inputManager'].releaseDevices(self.environment)
|
||||||
|
self.environment['runtime']['outputManager'].presentText(self.environment, "Quit Fenrir", soundIcon='ScreenReaderOff', interrupt=True)
|
||||||
|
if self.environment['runtime']['screenManager']:
|
||||||
|
self.environment['runtime']['screenManager'].shutdown(self.environment)
|
||||||
|
if self.environment['runtime']['commandManager']:
|
||||||
|
self.environment['runtime']['commandManager'].shutdown(self.environment)
|
||||||
|
if self.environment['runtime']['inputManager']:
|
||||||
|
self.environment['runtime']['inputManager'].shutdown(self.environment)
|
||||||
|
if self.environment['runtime']['outputManager']:
|
||||||
|
self.environment['runtime']['outputManager'].shutdown(self.environment)
|
||||||
if self.environment['runtime']['screenDriver']:
|
if self.environment['runtime']['screenDriver']:
|
||||||
self.environment['runtime']['screenDriver'].shutdown(self.environment)
|
self.environment['runtime']['screenDriver'].shutdown(self.environment)
|
||||||
self.environment['runtime']['inputManager'].releaseDevices(self.environment)
|
|
||||||
if self.environment['runtime']['inputDriver']:
|
if self.environment['runtime']['inputDriver']:
|
||||||
self.environment['runtime']['inputDriver'].shutdown(self.environment)
|
self.environment['runtime']['inputDriver'].shutdown(self.environment)
|
||||||
if self.environment['runtime']['soundDriver']:
|
if self.environment['runtime']['soundDriver']:
|
||||||
@ -71,6 +78,7 @@ class fenrir():
|
|||||||
self.environment['runtime']['speechDriver'].shutdown(self.environment)
|
self.environment['runtime']['speechDriver'].shutdown(self.environment)
|
||||||
if self.environment['runtime']['debug']:
|
if self.environment['runtime']['debug']:
|
||||||
self.environment['runtime']['debug'].closeDebugFile()
|
self.environment['runtime']['debug'].closeDebugFile()
|
||||||
|
time.sleep(0.8) # wait a little before splatter it :)
|
||||||
self.environment = None
|
self.environment = None
|
||||||
|
|
||||||
app = fenrir()
|
app = fenrir()
|
||||||
|
Loading…
Reference in New Issue
Block a user