mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 23:57:19 +02:00
Allow navigating Stream settings using controller/keyboard all the time
This commit is contained in:
parent
e73b4dfe78
commit
0f88396db8
@ -311,19 +311,17 @@ export class StreamSettings {
|
|||||||
// Lock scroll bar
|
// Lock scroll bar
|
||||||
document.body.classList.add('bx-no-scroll');
|
document.body.classList.add('bx-no-scroll');
|
||||||
|
|
||||||
if (getPref(PrefKey.UI_CONTROLLER_FRIENDLY)) {
|
// Focus the first visible setting
|
||||||
// Focus the first visible setting
|
this.#focusDirection(NavigationDirection.DOWN);
|
||||||
this.#focusDirection(NavigationDirection.DOWN);
|
|
||||||
|
|
||||||
// Add event listeners
|
// Add event listeners
|
||||||
$container.addEventListener('keydown', this);
|
$container.addEventListener('keydown', this);
|
||||||
|
|
||||||
// Start gamepad polling
|
// Start gamepad polling
|
||||||
this.#startGamepadPolling();
|
this.#startGamepadPolling();
|
||||||
|
|
||||||
// Disable xCloud's navigation polling
|
// Disable xCloud's navigation polling
|
||||||
(window as any).BX_EXPOSED.disableGamepadPolling = true;
|
(window as any).BX_EXPOSED.disableGamepadPolling = true;
|
||||||
}
|
|
||||||
|
|
||||||
BxEvent.dispatch(window, BxEvent.XCLOUD_DIALOG_SHOWN);
|
BxEvent.dispatch(window, BxEvent.XCLOUD_DIALOG_SHOWN);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user