mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Android: Show how long ago each savestate was created
This commit is contained in:
@ -482,6 +482,17 @@ std::string GetInfoStringOfSlot(int slot, bool translate)
|
||||
return Common::Timer::GetDateTimeFormatted(header.time);
|
||||
}
|
||||
|
||||
u64 GetUnixTimeOfSlot(int slot)
|
||||
{
|
||||
State::StateHeader header;
|
||||
if (!ReadHeader(MakeStateFilename(slot), header))
|
||||
return 0;
|
||||
|
||||
constexpr u64 MS_PER_SEC = 1000;
|
||||
return static_cast<u64>(header.time * MS_PER_SEC) +
|
||||
(Common::Timer::DOUBLE_TIME_OFFSET * MS_PER_SEC);
|
||||
}
|
||||
|
||||
static void LoadFileStateData(const std::string& filename, std::vector<u8>& ret_data)
|
||||
{
|
||||
Flush();
|
||||
|
Reference in New Issue
Block a user