mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Only show FL/PL percentage when it's > 1%
This commit is contained in:
parent
57fb22b905
commit
c1786d3fba
8
dist/better-xcloud.lite.user.js
vendored
8
dist/better-xcloud.lite.user.js
vendored
@ -2133,16 +2133,16 @@ class StreamStatsCollector {
|
||||
received: 0,
|
||||
dropped: 0,
|
||||
toString() {
|
||||
let framesDroppedPercentage = (this.dropped * 100 / (this.dropped + this.received || 1)).toFixed(1);
|
||||
return framesDroppedPercentage === "0.0" ? this.dropped.toString() : `${this.dropped} (${framesDroppedPercentage}%)`;
|
||||
let percentage = (this.dropped * 100 / (this.dropped + this.received || 1)).toFixed(1);
|
||||
return percentage.startsWith("0.") ? this.dropped.toString() : `${this.dropped} (${percentage}%)`;
|
||||
}
|
||||
},
|
||||
pl: {
|
||||
received: 0,
|
||||
dropped: 0,
|
||||
toString() {
|
||||
let packetsLostPercentage = (this.dropped * 100 / (this.dropped + this.received || 1)).toFixed(1);
|
||||
return packetsLostPercentage === "0.0" ? this.dropped.toString() : `${this.dropped} (${packetsLostPercentage}%)`;
|
||||
let percentage = (this.dropped * 100 / (this.dropped + this.received || 1)).toFixed(1);
|
||||
return percentage.startsWith("0.") ? this.dropped.toString() : `${this.dropped} (${percentage}%)`;
|
||||
}
|
||||
},
|
||||
dt: {
|
||||
|
8
dist/better-xcloud.user.js
vendored
8
dist/better-xcloud.user.js
vendored
@ -2243,16 +2243,16 @@ class StreamStatsCollector {
|
||||
received: 0,
|
||||
dropped: 0,
|
||||
toString() {
|
||||
let framesDroppedPercentage = (this.dropped * 100 / (this.dropped + this.received || 1)).toFixed(1);
|
||||
return framesDroppedPercentage === "0.0" ? this.dropped.toString() : `${this.dropped} (${framesDroppedPercentage}%)`;
|
||||
let percentage = (this.dropped * 100 / (this.dropped + this.received || 1)).toFixed(1);
|
||||
return percentage.startsWith("0.") ? this.dropped.toString() : `${this.dropped} (${percentage}%)`;
|
||||
}
|
||||
},
|
||||
pl: {
|
||||
received: 0,
|
||||
dropped: 0,
|
||||
toString() {
|
||||
let packetsLostPercentage = (this.dropped * 100 / (this.dropped + this.received || 1)).toFixed(1);
|
||||
return packetsLostPercentage === "0.0" ? this.dropped.toString() : `${this.dropped} (${packetsLostPercentage}%)`;
|
||||
let percentage = (this.dropped * 100 / (this.dropped + this.received || 1)).toFixed(1);
|
||||
return percentage.startsWith("0.") ? this.dropped.toString() : `${this.dropped} (${percentage}%)`;
|
||||
}
|
||||
},
|
||||
dt: {
|
||||
|
@ -127,8 +127,8 @@ export class StreamStatsCollector {
|
||||
received: 0,
|
||||
dropped: 0,
|
||||
toString() {
|
||||
const framesDroppedPercentage = (this.dropped * 100 / ((this.dropped + this.received) || 1)).toFixed(1);
|
||||
return framesDroppedPercentage === '0.0' ? this.dropped.toString() : `${this.dropped} (${framesDroppedPercentage}%)`;
|
||||
const percentage = (this.dropped * 100 / ((this.dropped + this.received) || 1)).toFixed(1);
|
||||
return percentage.startsWith('0.') ? this.dropped.toString() : `${this.dropped} (${percentage}%)`;
|
||||
},
|
||||
},
|
||||
|
||||
@ -136,8 +136,8 @@ export class StreamStatsCollector {
|
||||
received: 0,
|
||||
dropped: 0,
|
||||
toString() {
|
||||
const packetsLostPercentage = (this.dropped * 100 / ((this.dropped + this.received) || 1)).toFixed(1);
|
||||
return packetsLostPercentage === '0.0' ? this.dropped.toString() : `${this.dropped} (${packetsLostPercentage}%)`;
|
||||
const percentage = (this.dropped * 100 / ((this.dropped + this.received) || 1)).toFixed(1);
|
||||
return percentage.startsWith('0.') ? this.dropped.toString() : `${this.dropped} (${percentage}%)`;
|
||||
},
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user