SaveState/DolphinWX: Display time and date of savestate when a slot is selected, or Empty if no savestate exists in the slot.

This commit is contained in:
Admiral H. Curtiss
2015-07-12 01:49:12 +02:00
parent df20326d45
commit 16272f4975
5 changed files with 38 additions and 3 deletions

View File

@ -435,6 +435,19 @@ bool ReadHeader(const std::string& filename, StateHeader& header)
return true;
}
std::string GetInfoStringOfSlot(int slot)
{
std::string filename = MakeStateFilename(slot);
if (!File::Exists(filename))
return "Empty";
State::StateHeader header;
if (!ReadHeader(filename, header))
return "Unknown";
return Common::Timer::GetDateTimeFormatted(header.time);
}
static void LoadFileStateData(const std::string& filename, std::vector<u8>& ret_data)
{
Flush();