Preload Remote Play consoles by default

This commit is contained in:
redphx 2024-04-02 07:01:06 +07:00
parent aebb7888d1
commit 33941a12d1

View File

@ -21,6 +21,7 @@ const SCRIPT_HOME = 'https://github.com/redphx/better-xcloud';
// Setup flags
const DEFAULT_FLAGS = {
PreloadRemotePlay: true,
PreloadUi: false,
EnableXcloudLogging: false,
@ -3775,6 +3776,10 @@ class RemotePlay {
}
}
static preload() {
RemotePlay.#initialize();
}
static showDialog() {
RemotePlay.#initialize();
RemotePlay.#dialog.show();
@ -10243,6 +10248,9 @@ function injectSettingsButton($parent) {
},
});
$headerFragment.appendChild($remotePlayBtn);
// Preload Remote Play
BX_FLAGS.PreloadRemotePlay && RemotePlay.preload()
}