mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-29 06:40:16 +00:00
Qt: Avoid showing "0 minutes" of played time (#3447)
This commit is contained in:
parent
9c4e15ef1c
commit
5dc55bb4a1
@ -357,8 +357,10 @@ QString GameListModel::formatTimespan(time_t timespan)
|
|||||||
const u32 minutes = static_cast<u32>((timespan % 3600) / 60);
|
const u32 minutes = static_cast<u32>((timespan % 3600) / 60);
|
||||||
if (hours > 0)
|
if (hours > 0)
|
||||||
return qApp->translate("GameList", "%n hours", "", hours);
|
return qApp->translate("GameList", "%n hours", "", hours);
|
||||||
else
|
else if (minutes > 0)
|
||||||
return qApp->translate("GameList", "%n minutes", "", minutes);
|
return qApp->translate("GameList", "%n minutes", "", minutes);
|
||||||
|
else
|
||||||
|
return qApp->translate("GameList", "%n seconds", "", static_cast<u32>((timespan % 3600) % 60));
|
||||||
}
|
}
|
||||||
|
|
||||||
const QPixmap& GameListModel::getIconPixmapForEntry(const GameList::Entry* ge) const
|
const QPixmap& GameListModel::getIconPixmapForEntry(const GameList::Entry* ge) const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user