mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 08:07:18 +02:00
Remove the "Controller Polling Rate" setting as it didn't work (#167)
This commit is contained in:
parent
1ea5f5031e
commit
1ffe5c218a
@ -3345,7 +3345,6 @@ class Preferences {
|
|||||||
static get STREAM_DISABLE_FEEDBACK_DIALOG() { return 'stream_disable_feedback_dialog'; }
|
static get STREAM_DISABLE_FEEDBACK_DIALOG() { return 'stream_disable_feedback_dialog'; }
|
||||||
|
|
||||||
static get CONTROLLER_ENABLE_SHORTCUTS() { return 'controller_enable_shortcuts'; }
|
static get CONTROLLER_ENABLE_SHORTCUTS() { return 'controller_enable_shortcuts'; }
|
||||||
static get CONTROLLER_POLLING_RATE() { return 'controller_polling_rate'; }
|
|
||||||
|
|
||||||
static get MKB_ENABLED() { return 'mkb_enabled'; }
|
static get MKB_ENABLED() { return 'mkb_enabled'; }
|
||||||
static get MKB_ABSOLUTE_MOUSE() { return 'mkb_absolute_mouse'; }
|
static get MKB_ABSOLUTE_MOUSE() { return 'mkb_absolute_mouse'; }
|
||||||
@ -3577,15 +3576,6 @@ class Preferences {
|
|||||||
[Preferences.CONTROLLER_ENABLE_SHORTCUTS]: {
|
[Preferences.CONTROLLER_ENABLE_SHORTCUTS]: {
|
||||||
'default': false,
|
'default': false,
|
||||||
},
|
},
|
||||||
[Preferences.CONTROLLER_POLLING_RATE]: {
|
|
||||||
'type': 'number',
|
|
||||||
'default': 50,
|
|
||||||
'options': {
|
|
||||||
16: '62.5 Hz (16ms)',
|
|
||||||
32: '31.25 Hz (32ms)',
|
|
||||||
50: `20 Hz (50ms - ${__('default')})`,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
[Preferences.MKB_ENABLED]: {
|
[Preferences.MKB_ENABLED]: {
|
||||||
'default': false,
|
'default': false,
|
||||||
@ -4061,18 +4051,6 @@ const PREFS = new Preferences();
|
|||||||
|
|
||||||
class Patcher {
|
class Patcher {
|
||||||
static #PATCHES = {
|
static #PATCHES = {
|
||||||
// Modify controller polling rate
|
|
||||||
controllerPollingRate: (PREFS.get(Preferences.CONTROLLER_POLLING_RATE) !== 50) && function(funcStr) {
|
|
||||||
const text = '.startGamepadPolling=()';
|
|
||||||
const index = funcStr.indexOf(text);
|
|
||||||
if (index === -1) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const patchedStr = funcStr.substring(index, index + 100).replace(/setInterval\((\w+),(\d+)\)/, `setInterval($1,${PREFS.get(Preferences.CONTROLLER_POLLING_RATE)})`);
|
|
||||||
return funcStr.substring(0, index) + patchedStr + funcStr.substring(index + 100);
|
|
||||||
},
|
|
||||||
|
|
||||||
// Enable Remote Play feature
|
// Enable Remote Play feature
|
||||||
remotePlayConnectMode: PREFS.get(Preferences.REMOTE_PLAY_ENABLED) && function(funcStr) {
|
remotePlayConnectMode: PREFS.get(Preferences.REMOTE_PLAY_ENABLED) && function(funcStr) {
|
||||||
const text = 'connectMode:"cloud-connect"';
|
const text = 'connectMode:"cloud-connect"';
|
||||||
@ -5729,7 +5707,6 @@ function injectSettingsButton($parent) {
|
|||||||
[Preferences.STREAM_DISABLE_FEEDBACK_DIALOG]: __('disable-post-stream-feedback-dialog'),
|
[Preferences.STREAM_DISABLE_FEEDBACK_DIALOG]: __('disable-post-stream-feedback-dialog'),
|
||||||
},
|
},
|
||||||
[__('controller')]: {
|
[__('controller')]: {
|
||||||
[Preferences.CONTROLLER_POLLING_RATE]: __('controller-polling-rate'),
|
|
||||||
[Preferences.CONTROLLER_ENABLE_SHORTCUTS]: __('enable-controller-shortcuts'),
|
[Preferences.CONTROLLER_ENABLE_SHORTCUTS]: __('enable-controller-shortcuts'),
|
||||||
},
|
},
|
||||||
[__('touch-controller')]: {
|
[__('touch-controller')]: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user