mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 08:07:18 +02:00
Show allocation time instead of total wait time
This commit is contained in:
parent
04cf66a466
commit
29dfdaf72e
@ -15,7 +15,9 @@ export class GameTile {
|
|||||||
const output = [];
|
const output = [];
|
||||||
h > 0 && output.push(`${h}h`);
|
h > 0 && output.push(`${h}h`);
|
||||||
m > 0 && output.push(`${m}m`);
|
m > 0 && output.push(`${m}m`);
|
||||||
|
if (s > 0 || output.length === 0) {
|
||||||
output.push(`${s}s`);
|
output.push(`${s}s`);
|
||||||
|
}
|
||||||
|
|
||||||
return output.join(' ');
|
return output.join(' ');
|
||||||
}
|
}
|
||||||
@ -28,11 +30,11 @@ export class GameTile {
|
|||||||
if (info) {
|
if (info) {
|
||||||
const waitTime = await api.getWaitTime(info.titleId);
|
const waitTime = await api.getWaitTime(info.titleId);
|
||||||
if (waitTime) {
|
if (waitTime) {
|
||||||
totalWaitTime = waitTime.estimatedTotalWaitTimeInSeconds || 0;
|
totalWaitTime = waitTime.estimatedAllocationTimeInSeconds;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (totalWaitTime && totalWaitTime == 10 && $elm.isConnected) {
|
if (typeof totalWaitTime === 'number' && $elm.isConnected) {
|
||||||
const $div = CE('div', {'class': 'bx-game-tile-wait-time'},
|
const $div = CE('div', {'class': 'bx-game-tile-wait-time'},
|
||||||
createSvgIcon(BxIcon.PLAYTIME),
|
createSvgIcon(BxIcon.PLAYTIME),
|
||||||
CE('span', {}, GameTile.#secondsToHms(totalWaitTime)),
|
CE('span', {}, GameTile.#secondsToHms(totalWaitTime)),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user