mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-07 13:48:27 +02:00
Fix forcing native MKB not working when mode = "default"
This commit is contained in:
10
dist/better-xcloud.user.js
vendored
10
dist/better-xcloud.user.js
vendored
@@ -1589,6 +1589,9 @@ class GlobalSettingsStorage extends BaseSettingsStore {
|
||||
if (!setting.unsupported) setting.multipleOptions = GhPagesUtils.getNativeMkbCustomList(!0), window.addEventListener(BxEvent.GH_PAGES_FORCE_NATIVE_MKB_UPDATED, (e) => {
|
||||
setting.multipleOptions = GhPagesUtils.getNativeMkbCustomList();
|
||||
});
|
||||
},
|
||||
params: {
|
||||
size: 6
|
||||
}
|
||||
},
|
||||
"nativeMkb.scroll.sensitivityX": {
|
||||
@@ -4871,7 +4874,7 @@ class SettingElement {
|
||||
let $control = CE("select", {
|
||||
multiple: !0,
|
||||
tabindex: 0
|
||||
}), size = params.size ? params.size : Object.keys(setting.multipleOptions).length;
|
||||
}), totalOptions = Object.keys(setting.multipleOptions).length, size = params.size ? Math.min(params.size, totalOptions) : totalOptions;
|
||||
$control.setAttribute("size", size.toString());
|
||||
for (let value in setting.multipleOptions) {
|
||||
let label = setting.multipleOptions[value], $option = CE("option", { value }, label);
|
||||
@@ -5928,7 +5931,8 @@ class SettingsDialog extends NavigationDialog {
|
||||
"nativeMkb.mode",
|
||||
{
|
||||
pref: "nativeMkb.forcedGames",
|
||||
multiLines: !0
|
||||
multiLines: !0,
|
||||
note: CE("a", { href: "https://github.com/redphx/better-xcloud/discussions/574", target: "_blank" }, t("unofficial-game-list"))
|
||||
},
|
||||
"mkb.enabled",
|
||||
"mkb.cursor.hideIdle"
|
||||
@@ -9303,7 +9307,7 @@ window.addEventListener(BxEvent.CAPTURE_SCREENSHOT, (e) => {
|
||||
ScreenshotManager.getInstance().takeScreenshot();
|
||||
});
|
||||
function main() {
|
||||
if (GhPagesUtils.fetchLatestCommit(), getPref("nativeMkb.mode") === "on") {
|
||||
if (GhPagesUtils.fetchLatestCommit(), getPref("nativeMkb.mode") !== "off") {
|
||||
let customList = getPref("nativeMkb.forcedGames");
|
||||
BX_FLAGS.ForceNativeMkbTitles.push(...customList);
|
||||
}
|
||||
|
Reference in New Issue
Block a user