mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-06-04 16:46:57 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c6043b5a7 | ||
|
|
3aa07dc9ce |
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
@@ -4,7 +4,7 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- v4-dev
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
## [4.7.2](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.7.1...v4.7.2) (2024-09-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **utils:** fix potential race condition in findSP ([3aa07dc](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/3aa07dc9ce798ff8d1148424ee9e8a8bf2ba78c6))
|
||||||
|
|
||||||
## [4.7.1](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.7.0...v4.7.1) (2024-08-08)
|
## [4.7.1](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.7.0...v4.7.1) (2024-08-08)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@decky/ui",
|
"name": "@decky/ui",
|
||||||
"version": "4.7.1",
|
"version": "4.7.2",
|
||||||
"description": "A library for interacting with the Steam frontend in Decky plugins and elsewhere.",
|
"description": "A library for interacting with the Steam frontend in Decky plugins and elsewhere.",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export function findSP(): Window {
|
|||||||
if (document.title == 'SP') return window;
|
if (document.title == 'SP') return window;
|
||||||
// new (SP as popup)
|
// new (SP as popup)
|
||||||
const navTrees = getGamepadNavigationTrees();
|
const navTrees = getGamepadNavigationTrees();
|
||||||
return navTrees?.find((x: any) => x.m_ID == 'root_1_').Root.Element.ownerDocument.defaultView;
|
return navTrees?.find((x: any) => x.m_ID == 'root_1_')?.Root?.Element?.ownerDocument?.defaultView;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -40,6 +40,6 @@ export function getFocusNavController(): any {
|
|||||||
*/
|
*/
|
||||||
export function getGamepadNavigationTrees(): any {
|
export function getGamepadNavigationTrees(): any {
|
||||||
const focusNav = getFocusNavController();
|
const focusNav = getFocusNavController();
|
||||||
const context = focusNav.m_ActiveContext || focusNav.m_LastActiveContext;
|
const context = focusNav?.m_ActiveContext || focusNav?.m_LastActiveContext;
|
||||||
return context?.m_rgGamepadNavigationTrees;
|
return context?.m_rgGamepadNavigationTrees;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user