diff options
| -rw-r--r-- | frontend/src/components/settings/pages/general/Updater.tsx | 2 | ||||
| -rw-r--r-- | frontend/src/utils/windows.ts | 9 |
2 files changed, 1 insertions, 10 deletions
diff --git a/frontend/src/components/settings/pages/general/Updater.tsx b/frontend/src/components/settings/pages/general/Updater.tsx index b38b6d01..03c2844c 100644 --- a/frontend/src/components/settings/pages/general/Updater.tsx +++ b/frontend/src/components/settings/pages/general/Updater.tsx @@ -6,6 +6,7 @@ import { Focusable, ProgressBarWithInfo, Spinner, + findSP, showModal, } from 'decky-frontend-lib'; import { useCallback } from 'react'; @@ -14,7 +15,6 @@ import { useEffect, useState } from 'react'; import { FaExclamation } from 'react-icons/fa'; import { VerInfo, callUpdaterMethod, finishUpdate } from '../../../../updater'; -import { findSP } from '../../../../utils/windows'; import { useDeckyState } from '../../../DeckyState'; import InlinePatchNotes from '../../../patchnotes/InlinePatchNotes'; import WithSuspense from '../../../WithSuspense'; diff --git a/frontend/src/utils/windows.ts b/frontend/src/utils/windows.ts deleted file mode 100644 index a08f304a..00000000 --- a/frontend/src/utils/windows.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { getFocusNavController } from '../../../../lib/dist'; - -export function findSP(): Window { - // old (SP as host) - if (document.title == 'SP') return window; - // new (SP as popup) - return getFocusNavController().m_ActiveContext.m_rgGamepadNavigationTrees.find((x: any) => x.m_ID == 'root_1_').Root - .Element.ownerDocument.defaultView; -} |
