Allow navigating Stream settings using controller/keyboard all the time

This commit is contained in:
redphx 2024-07-17 17:54:06 +07:00
parent e73b4dfe78
commit 0f88396db8

View File

@ -311,19 +311,17 @@ export class StreamSettings {
// Lock scroll bar
document.body.classList.add('bx-no-scroll');
if (getPref(PrefKey.UI_CONTROLLER_FRIENDLY)) {
// Focus the first visible setting
this.#focusDirection(NavigationDirection.DOWN);
// Focus the first visible setting
this.#focusDirection(NavigationDirection.DOWN);
// Add event listeners
$container.addEventListener('keydown', this);
// Add event listeners
$container.addEventListener('keydown', this);
// Start gamepad polling
this.#startGamepadPolling();
// Start gamepad polling
this.#startGamepadPolling();
// Disable xCloud's navigation polling
(window as any).BX_EXPOSED.disableGamepadPolling = true;
}
// Disable xCloud's navigation polling
(window as any).BX_EXPOSED.disableGamepadPolling = true;
BxEvent.dispatch(window, BxEvent.XCLOUD_DIALOG_SHOWN);
}