mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 15:47:18 +02:00
Fix "blockWebRtcStatsCollector" patch and add "blockGamepadStatsCollector" patch
This commit is contained in:
parent
7342da775f
commit
47ef5a9cd2
@ -7482,12 +7482,23 @@ class Patcher {
|
||||
|
||||
// Block WebRTC stats collector
|
||||
blockWebRtcStatsCollector: function(funcStr) {
|
||||
const text = 'this.intervalMs=0,';
|
||||
const text = 'this.shouldCollectStats=!0';
|
||||
if (!funcStr.includes(text)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return funcStr.replace(text, 'false,' + text);
|
||||
return funcStr.replace(text, 'this.shouldCollectStats=!1');
|
||||
},
|
||||
|
||||
blockGamepadStatsCollector: function(funcStr) {
|
||||
const text = 'this.inputPollingIntervalStats.addValue';
|
||||
if (!funcStr.includes(text)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
funcStr = funcStr.replace('this.inputPollingIntervalStats.addValue', '');
|
||||
funcStr = funcStr.replace('this.inputPollingDurationStats.addValue', '');
|
||||
return funcStr;
|
||||
},
|
||||
|
||||
enableXcloudLogger: function(funcStr) {
|
||||
@ -7737,6 +7748,8 @@ if (window.BX_VIBRATION_INTENSITY && window.BX_VIBRATION_INTENSITY < 1) {
|
||||
|
||||
ENABLE_XCLOUD_LOGGER && ['enableConsoleLogging'],
|
||||
|
||||
getPref(Preferences.BLOCK_TRACKING) && ['blockGamepadStatsCollector'],
|
||||
|
||||
[
|
||||
'disableGamepadDisconnectedScreen',
|
||||
ENABLE_NATIVE_MKB_BETA && 'mkbMouseAndKeyboardEnabled',
|
||||
|
Loading…
x
Reference in New Issue
Block a user