Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #9453 from JosJuice/state-metadata-osd
Android: Don't show OSD messages when opening savestate menu
  • Loading branch information
leoetlino committed Jan 27, 2021
2 parents 70447d0 + abd069a commit fb09acd
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions Source/Core/Core/State.cpp
Expand Up @@ -455,14 +455,7 @@ bool ReadHeader(const std::string& filename, StateHeader& header)
{
Flush();
File::IOFile f(filename, "rb");
if (!f)
{
Core::DisplayMessage("State not found", 2000);
return false;
}

f.ReadArray(&header, 1);
return true;
return f.ReadArray(&header, 1);
}

std::string GetInfoStringOfSlot(int slot, bool translate)
Expand Down Expand Up @@ -493,15 +486,14 @@ static void LoadFileStateData(const std::string& filename, std::vector<u8>& ret_
{
Flush();
File::IOFile f(filename, "rb");
if (!f)

StateHeader header;
if (!f.ReadArray(&header, 1))
{
Core::DisplayMessage("State not found", 2000);
return;
}

StateHeader header;
f.ReadArray(&header, 1);

if (strncmp(SConfig::GetInstance().GetGameID().c_str(), header.gameID, 6))
{
Core::DisplayMessage(fmt::format("State belongs to a different game (ID {})",
Expand Down

0 comments on commit fb09acd

Please sign in to comment.