summaryrefslogtreecommitdiff
path: root/frontend/src/developer.tsx
diff options
context:
space:
mode:
authorAAGaming <aagaming@riseup.net>2026-10-26 23:50:59 -0400
committerAAGaming <aagaming@riseup.net>2026-10-26 23:50:59 -0400
commite82a55e9582fbd6d84f3f4510b04480c35e41fe4 (patch)
tree1fe05c2296bbedbf301137a67a28ef542804fd69 /frontend/src/developer.tsx
parent6301508037b30489c42ee9ea8acee97cdea76297 (diff)
downloaddecky-loader-e82a55e9582fbd6d84f3f4510b04480c35e41fe4.tar.gz
decky-loader-e82a55e9582fbd6d84f3f4510b04480c35e41fe4.zip
feat: initial VERY VERY incomplete steam frame support
Diffstat (limited to 'frontend/src/developer.tsx')
-rw-r--r--frontend/src/developer.tsx42
1 files changed, 18 insertions, 24 deletions
diff --git a/frontend/src/developer.tsx b/frontend/src/developer.tsx
index 5df6de07..6e1b9599 100644
--- a/frontend/src/developer.tsx
+++ b/frontend/src/developer.tsx
@@ -9,20 +9,13 @@ const logger = new Logger('DeveloperMode');
let removeSettingsObserver: () => void = () => {};
-declare global {
- interface Window {
- settingsStore: any;
- }
-}
-
export async function setShowValveInternal(show: boolean) {
if (show) {
- const mobx =
- window.settingsStore[
- Object.getOwnPropertySymbols(window.settingsStore).find(
- (x) => x.toString() == 'Symbol(mobx administration)',
- ) as any
- ];
+ const mobx = (window.settingsStore as any)[
+ Object.getOwnPropertySymbols(window.settingsStore).find(
+ (x) => x.toString() == 'Symbol(mobx administration)',
+ ) as any
+ ];
removeSettingsObserver = (mobx.observe_ || mobx.observe).call(mobx, (e: any) => {
e.newValue.bIsValveEmail = true;
@@ -37,17 +30,18 @@ export async function setShowValveInternal(show: boolean) {
}
}
-export async function setShouldConnectToReactDevTools(enable: boolean) {
- DeckyPluginLoader.toaster.toast({
- title: enable ? (
- <TranslationHelper transClass={TranslationClass.DEVELOPER} transText={'enabling'} />
- ) : (
- <TranslationHelper transClass={TranslationClass.DEVELOPER} transText={'disabling'} />
- ),
- body: <TranslationHelper transClass={TranslationClass.DEVELOPER} transText={'5secreload'} />,
- icon: <FaReact />,
- });
- await sleep(5000);
+export async function setShouldConnectToReactDevTools(enable: boolean, skipWait?: boolean) {
+ skipWait ||
+ DeckyPluginLoader.toaster.toast({
+ title: enable ? (
+ <TranslationHelper transClass={TranslationClass.DEVELOPER} transText={'enabling'} />
+ ) : (
+ <TranslationHelper transClass={TranslationClass.DEVELOPER} transText={'disabling'} />
+ ),
+ body: <TranslationHelper transClass={TranslationClass.DEVELOPER} transText={'5secreload'} />,
+ icon: <FaReact />,
+ });
+ skipWait || (await sleep(5000));
return enable ? DeckyBackend.call('utilities/enable_rdt') : DeckyBackend.call('utilities/disable_rdt');
}
@@ -58,5 +52,5 @@ export async function startup() {
if (isValveInternalEnabled) setShowValveInternal(isValveInternalEnabled);
if ((isRDTEnabled && !window.deckyHasConnectedRDT) || (!isRDTEnabled && window.deckyHasConnectedRDT))
- setShouldConnectToReactDevTools(isRDTEnabled);
+ setShouldConnectToReactDevTools(isRDTEnabled, true);
}