mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 23:57:19 +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
|
// Block WebRTC stats collector
|
||||||
blockWebRtcStatsCollector: function(funcStr) {
|
blockWebRtcStatsCollector: function(funcStr) {
|
||||||
const text = 'this.intervalMs=0,';
|
const text = 'this.shouldCollectStats=!0';
|
||||||
if (!funcStr.includes(text)) {
|
if (!funcStr.includes(text)) {
|
||||||
return false;
|
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) {
|
enableXcloudLogger: function(funcStr) {
|
||||||
@ -7737,6 +7748,8 @@ if (window.BX_VIBRATION_INTENSITY && window.BX_VIBRATION_INTENSITY < 1) {
|
|||||||
|
|
||||||
ENABLE_XCLOUD_LOGGER && ['enableConsoleLogging'],
|
ENABLE_XCLOUD_LOGGER && ['enableConsoleLogging'],
|
||||||
|
|
||||||
|
getPref(Preferences.BLOCK_TRACKING) && ['blockGamepadStatsCollector'],
|
||||||
|
|
||||||
[
|
[
|
||||||
'disableGamepadDisconnectedScreen',
|
'disableGamepadDisconnectedScreen',
|
||||||
ENABLE_NATIVE_MKB_BETA && 'mkbMouseAndKeyboardEnabled',
|
ENABLE_NATIVE_MKB_BETA && 'mkbMouseAndKeyboardEnabled',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user