mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 11:31:58 +00:00
Actually utilize the unload function
This commit is contained in:
+3
-2
@@ -71,11 +71,11 @@ class PluginWrapper:
|
|||||||
self.log.error("Failed to start " + self.name + "!\n" + format_exc())
|
self.log.error("Failed to start " + self.name + "!\n" + format_exc())
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
def _unload(self):
|
async def _unload(self):
|
||||||
try:
|
try:
|
||||||
self.log.info("Attempting to unload " + self.name + "\n")
|
self.log.info("Attempting to unload " + self.name + "\n")
|
||||||
if hasattr(self.Plugin, "_unload"):
|
if hasattr(self.Plugin, "_unload"):
|
||||||
self.Plugin._unload(self.Plugin)
|
await self.Plugin._unload(self.Plugin)
|
||||||
except:
|
except:
|
||||||
self.log.error("Failed to unload " + self.name + "!\n" + format_exc())
|
self.log.error("Failed to unload " + self.name + "!\n" + format_exc())
|
||||||
exit(0)
|
exit(0)
|
||||||
@@ -99,6 +99,7 @@ class PluginWrapper:
|
|||||||
break
|
break
|
||||||
data = loads(line.decode("utf-8"))
|
data = loads(line.decode("utf-8"))
|
||||||
if "stop" in data:
|
if "stop" in data:
|
||||||
|
await self._unload()
|
||||||
get_event_loop().stop()
|
get_event_loop().stop()
|
||||||
while get_event_loop().is_running():
|
while get_event_loop().is_running():
|
||||||
await sleep(0)
|
await sleep(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user