Qt: show time of day in 'last played' game info, log current time when RPCS3 boots (#11220)

This commit is contained in:
Eladash 2022-02-24 00:40:18 +02:00 committed by GitHub
parent f3823232e0
commit 86a04a867b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 15 deletions

View file

@ -449,7 +449,7 @@ void gui_application::StartPlaytime(bool start_playtime = true)
return;
}
m_persistent_settings->SetLastPlayed(serial, QDate::currentDate().toString(gui::persistent::last_played_date_format));
m_persistent_settings->SetLastPlayed(serial, QDateTime::currentDateTime().toString(gui::persistent::last_played_date_format));
m_timer_playtime.start();
m_timer.start(10000); // Update every 10 seconds in case the emulation crashes
}
@ -471,7 +471,7 @@ void gui_application::UpdatePlaytime()
}
m_persistent_settings->AddPlaytime(serial, m_timer_playtime.restart());
m_persistent_settings->SetLastPlayed(serial, QDate::currentDate().toString(gui::persistent::last_played_date_format));
m_persistent_settings->SetLastPlayed(serial, QDateTime::currentDateTime().toString(gui::persistent::last_played_date_format));
}
void gui_application::StopPlaytime()
@ -489,7 +489,7 @@ void gui_application::StopPlaytime()
}
m_persistent_settings->AddPlaytime(serial, m_timer_playtime.restart());
m_persistent_settings->SetLastPlayed(serial, QDate::currentDate().toString(gui::persistent::last_played_date_format));
m_persistent_settings->SetLastPlayed(serial, QDateTime::currentDateTime().toString(gui::persistent::last_played_date_format));
m_timer_playtime.invalidate();
}