mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 15:47:18 +02:00
Fix stats texts
This commit is contained in:
parent
1bf2f41813
commit
dca8ab9cf6
@ -112,7 +112,7 @@ export class StreamStatsCollector {
|
|||||||
current: 0,
|
current: 0,
|
||||||
toString() {
|
toString() {
|
||||||
const maxFps = getPref<VideoMaxFps>(PrefKey.VIDEO_MAX_FPS);
|
const maxFps = getPref<VideoMaxFps>(PrefKey.VIDEO_MAX_FPS);
|
||||||
return maxFps < 60 ? `${maxFps}/${this.current}` : this.current.toString();
|
return maxFps < 60 ? `${maxFps}/${this.current}`.padStart(5, ' ') : this.current.toString();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ export class StreamStatsCollector {
|
|||||||
dropped: 0,
|
dropped: 0,
|
||||||
toString() {
|
toString() {
|
||||||
const framesDroppedPercentage = (this.dropped * 100 / ((this.dropped + this.received) || 1)).toFixed(1);
|
const framesDroppedPercentage = (this.dropped * 100 / ((this.dropped + this.received) || 1)).toFixed(1);
|
||||||
return framesDroppedPercentage === '0.00' ? this.dropped.toString() : `${this.dropped} (${framesDroppedPercentage}%)`;
|
return framesDroppedPercentage === '0.0' ? this.dropped.toString() : `${this.dropped} (${framesDroppedPercentage}%)`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ export class StreamStatsCollector {
|
|||||||
dropped: 0,
|
dropped: 0,
|
||||||
toString() {
|
toString() {
|
||||||
const packetsLostPercentage = (this.dropped * 100 / ((this.dropped + this.received) || 1)).toFixed(1);
|
const packetsLostPercentage = (this.dropped * 100 / ((this.dropped + this.received) || 1)).toFixed(1);
|
||||||
return packetsLostPercentage === '0.00' ? this.dropped.toString() : `${this.dropped} (${packetsLostPercentage}%)`;
|
return packetsLostPercentage === '0.0' ? this.dropped.toString() : `${this.dropped} (${packetsLostPercentage}%)`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user