Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #11120 from AdmiralCurtiss/gci-open-fail
HW/GCMemcardDirectory: Add error message if opening GCI fails.
  • Loading branch information
AdmiralCurtiss committed Oct 5, 2022
2 parents cf094eb + 662caf9 commit de5a98a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Source/Core/Core/HW/GCMemcard/GCMemcardDirectory.cpp
Expand Up @@ -595,7 +595,6 @@ bool GCMemcardDirectory::SetUsedBlocks(int save_index)
void GCMemcardDirectory::FlushToFile()
{
std::unique_lock l(m_write_mutex);
int errors = 0;
Memcard::DEntry invalid;
for (Memcard::GCIFile& save : m_saves)
{
Expand Down Expand Up @@ -644,12 +643,18 @@ void GCMemcardDirectory::FlushToFile()
}
else
{
++errors;
Core::DisplayMessage(
fmt::format("Failed to write save contents to {}", save.m_filename), 4000);
fmt::format("Failed to write save contents to {}", save.m_filename), 10000);
ERROR_LOG_FMT(EXPANSIONINTERFACE, "Failed to save data to {}", save.m_filename);
}
}
else
{
Core::DisplayMessage(
fmt::format("Failed to open file at {} for writing", save.m_filename), 10000);
ERROR_LOG_FMT(EXPANSIONINTERFACE, "Failed to open file at {} for writing",
save.m_filename);
}
}
else if (save.m_filename.length() != 0)
{
Expand Down

0 comments on commit de5a98a

Please sign in to comment.