summaryrefslogtreecommitdiff
path: root/backend/injector.py
diff options
context:
space:
mode:
authorAAGaming <aa@mail.catvibers.me>2023-04-06 13:00:54 -0400
committerAAGaming <aa@mail.catvibers.me>2023-04-06 13:00:54 -0400
commit15a6f7fdb87216bd3fe4ce7c55b13cf01134c6f3 (patch)
treef210bc8334a5f4324b96216d2cebe78900be6ebb /backend/injector.py
parent7d2cff874527f0fad539b534080edfc319b016c1 (diff)
downloaddecky-loader-15a6f7fdb87216bd3fe4ce7c55b13cf01134c6f3.tar.gz
decky-loader-15a6f7fdb87216bd3fe4ce7c55b13cf01134c6f3.zip
fix UI reloading on latest beta to prevent freeze when updating Decky
Diffstat (limited to 'backend/injector.py')
-rw-r--r--backend/injector.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/injector.py b/backend/injector.py
index ec865402..b28a0349 100644
--- a/backend/injector.py
+++ b/backend/injector.py
@@ -395,6 +395,7 @@ async def get_tab_lambda(test) -> Tab:
return tab
SHARED_CTX_NAMES = ["SharedJSContext", "Steam Shared Context presented by Valveā„¢", "Steam", "SP"]
+DO_NOT_CLOSE_URL = "Valve Steam Gamepad/default" # Steam Big Picture Mode tab
def tab_is_gamepadui(t: Tab) -> bool:
return "https://steamloopback.host/routes/" in t.url and t.title in SHARED_CTX_NAMES
@@ -414,7 +415,7 @@ async def inject_to_tab(tab_name, js, run_async=False):
async def close_old_tabs():
tabs = await get_tabs()
for t in tabs:
- if not t.title or t.title not in SHARED_CTX_NAMES:
+ if not t.title or (t.title not in SHARED_CTX_NAMES and DO_NOT_CLOSE_URL not in t.url):
logger.debug("Closing tab: " + getattr(t, "title", "Untitled"))
await t.close()
await sleep(0.5)