mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Disable the MKB feature for mobile browsers
This commit is contained in:
parent
9332892353
commit
dac5b39097
@ -6077,6 +6077,10 @@ class Preferences {
|
||||
|
||||
[Preferences.MKB_ENABLED]: {
|
||||
'default': false,
|
||||
'unsupported': (() => {
|
||||
const userAgent = (window.navigator.orgUserAgent || window.navigator.userAgent || '').toLowerCase();
|
||||
return userAgent.match(/(android|ios|ipad)/) ? __('browser-unsupported-feature') : false;
|
||||
})(),
|
||||
},
|
||||
|
||||
[Preferences.MKB_DEFAULT_PRESET_ID]: {
|
||||
@ -6361,9 +6365,9 @@ class Preferences {
|
||||
return;
|
||||
}
|
||||
|
||||
// Return "default" for STREAM_TOUCH_CONTROLLER pref when the browser doesn't support touch
|
||||
if (!HAS_TOUCH_SUPPORT && key === Preferences.STREAM_TOUCH_CONTROLLER) {
|
||||
return 'default';
|
||||
// Return default value if the feature is not supported
|
||||
if (Preferences.SETTINGS[key].unsupported) {
|
||||
return Preferences.SETTINGS[key].default;
|
||||
}
|
||||
|
||||
let value = this.#prefs[key];
|
||||
|
Loading…
x
Reference in New Issue
Block a user