Instance Description displays the last launch date
Initial Draft using the Standard C++ Library, still requires testing. Signed-off-by: Japa <japa4551@protonmail.com>
This commit is contained in:
parent
8dc3267925
commit
f41426f394
@ -925,7 +925,18 @@ QString MinecraftInstance::getStatusbarDescription()
|
||||
if(m_settings->get("ShowGameTime").toBool())
|
||||
{
|
||||
if (lastTimePlayed() > 0) {
|
||||
description.append(tr(", last played for %1").arg(Time::prettifyDuration(lastTimePlayed())));
|
||||
struct tm * localTime_format;
|
||||
localTime_format = localtime(lastLaunchTime());
|
||||
|
||||
char lastLaunchTime_formatted[13];
|
||||
strftime(lastLaunchTime_formatted,13,"%Ex",localTime_format);
|
||||
|
||||
description.append(
|
||||
tr(", last played at %1 for %2").arg(
|
||||
lastLaunchTime_formatted,
|
||||
Time::prettifyDuration(lastTimePlayed())
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (totalTimePlayed() > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user