mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 20:21:57 +00:00
how did this ever happen
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
|||||||
Focusable,
|
Focusable,
|
||||||
ProgressBarWithInfo,
|
ProgressBarWithInfo,
|
||||||
Spinner,
|
Spinner,
|
||||||
|
findSP,
|
||||||
showModal,
|
showModal,
|
||||||
} from 'decky-frontend-lib';
|
} from 'decky-frontend-lib';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
@@ -14,7 +15,6 @@ import { useEffect, useState } from 'react';
|
|||||||
import { FaExclamation } from 'react-icons/fa';
|
import { FaExclamation } from 'react-icons/fa';
|
||||||
|
|
||||||
import { VerInfo, callUpdaterMethod, finishUpdate } from '../../../../updater';
|
import { VerInfo, callUpdaterMethod, finishUpdate } from '../../../../updater';
|
||||||
import { findSP } from '../../../../utils/windows';
|
|
||||||
import { useDeckyState } from '../../../DeckyState';
|
import { useDeckyState } from '../../../DeckyState';
|
||||||
import InlinePatchNotes from '../../../patchnotes/InlinePatchNotes';
|
import InlinePatchNotes from '../../../patchnotes/InlinePatchNotes';
|
||||||
import WithSuspense from '../../../WithSuspense';
|
import WithSuspense from '../../../WithSuspense';
|
||||||
|
|||||||
@@ -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;
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user