mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-05 12:56:42 +02:00
Fix forcing native MKB not working when mode = "default"
This commit is contained in:
@@ -68,10 +68,11 @@ export class SettingElement {
|
||||
tabindex: 0,
|
||||
});
|
||||
|
||||
const size = params.size ? params.size : Object.keys(setting.multipleOptions!).length;
|
||||
const totalOptions = Object.keys(setting.multipleOptions!).length;
|
||||
const size = params.size ? Math.min(params.size, totalOptions) : totalOptions;
|
||||
$control.setAttribute('size', size.toString());
|
||||
|
||||
for (let value in setting.multipleOptions) {
|
||||
for (const value in setting.multipleOptions) {
|
||||
const label = setting.multipleOptions[value];
|
||||
|
||||
const $option = CE<HTMLOptionElement>('option', {value: value}, label) as HTMLOptionElement;
|
||||
|
@@ -424,7 +424,7 @@ export class GlobalSettingsStorage extends BaseSettingsStorage {
|
||||
},
|
||||
},
|
||||
|
||||
[PrefKey.FORCE_NATIVE_MKB_GAMES]: {
|
||||
[PrefKey.NATIVE_MKB_FORCED_GAMES]: {
|
||||
label: t('force-native-mkb-games'),
|
||||
default: [],
|
||||
unsupported: !AppInterface && UserAgent.isMobile(),
|
||||
@@ -437,6 +437,9 @@ export class GlobalSettingsStorage extends BaseSettingsStorage {
|
||||
});
|
||||
}
|
||||
},
|
||||
params: {
|
||||
size: 6,
|
||||
},
|
||||
},
|
||||
|
||||
[PrefKey.NATIVE_MKB_SCROLL_HORIZONTAL_SENSITIVITY]: {
|
||||
|
Reference in New Issue
Block a user