mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Change rewindstate metadata to say X seconds ago
This commit is contained in:
1 parent
c20d20ccba
commit
affdeb827e
47 files changed
+52
-2
No files matched your search
@@ -1,5 +1,6 @@
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
#include "Common/StringUtils.h"
|
||||
#include "Core/SaveState.h"
|
||||
#include "Core/SaveStateRewind.h"
|
||||
#include "Core/Core.h"
|
||||
@@ -64,11 +65,15 @@ CChunkFileReader::Error StateRingbuffer::Restore(std::string *errorString, std::
|
||||
*metadata = pa->T("Rewind");
|
||||
|
||||
if (states_[n].savedTime) {
|
||||
auto di = GetI18NCategory(I18NCat::DIALOG);
|
||||
metadata->append(" (");
|
||||
metadata->append(ApplySafeSubstitutions(di->T("%1 seconds ago"), static_cast<int>(time_now_d() - states_[n].savedTime)));
|
||||
/*
|
||||
char buffer[26];
|
||||
double unixTime = time_to_unix_utc(states_[n].savedTime);
|
||||
FormatUnixTime(unixTime, buffer, sizeof(buffer), false);
|
||||
metadata->append(buffer);
|
||||
*/
|
||||
metadata->append(")");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user