mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 22:01:59 +00:00
Fix desktop mode loop (#253)
* fix desktop mode making injector get stuck * Fix imports and variable references * Get data for all messages Co-authored-by: AAGaming <aa@mail.catvibers.me>
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ from logging import getLogger
|
|||||||
from traceback import format_exc
|
from traceback import format_exc
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from aiohttp import ClientSession
|
from aiohttp import ClientSession, WSMsgType
|
||||||
from aiohttp.client_exceptions import ClientConnectorError
|
from aiohttp.client_exceptions import ClientConnectorError
|
||||||
from asyncio.exceptions import TimeoutError
|
from asyncio.exceptions import TimeoutError
|
||||||
import uuid
|
import uuid
|
||||||
|
|||||||
+4
-3
@@ -12,7 +12,7 @@ from traceback import format_exc
|
|||||||
|
|
||||||
import aiohttp_cors
|
import aiohttp_cors
|
||||||
# Partial imports
|
# Partial imports
|
||||||
from aiohttp import ClientSession, client_exceptions
|
from aiohttp import ClientSession, client_exceptions, WSMsgType
|
||||||
from aiohttp.web import Application, Response, get, run_app, static
|
from aiohttp.web import Application, Response, get, run_app, static
|
||||||
from aiohttp_jinja2 import setup as jinja_setup
|
from aiohttp_jinja2 import setup as jinja_setup
|
||||||
|
|
||||||
@@ -140,8 +140,9 @@ class PluginManager:
|
|||||||
if msg.get("method", None) == "Page.domContentEventFired":
|
if msg.get("method", None) == "Page.domContentEventFired":
|
||||||
if not await tab.has_global_var("deckyHasLoaded", False):
|
if not await tab.has_global_var("deckyHasLoaded", False):
|
||||||
await self.inject_javascript(tab)
|
await self.inject_javascript(tab)
|
||||||
if msg.get("method", None) == "Inspector.detached":
|
if msg.get("method", None) == "Inspector.detached" or msg.get("type", None) in (WSMsgType.CLOSED, WSMsgType.ERROR):
|
||||||
logger.info("Steam is exiting...")
|
logger.info("CEF has disconnected...")
|
||||||
|
logger.debug("Exit message: " + str(msg))
|
||||||
await tab.close_websocket()
|
await tab.close_websocket()
|
||||||
break
|
break
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user