HW/GCMemcardDirectory: Add error message if opening GCI fails.
This commit is contained in:
parent
4b6086b20a
commit
662caf91ac
|
@ -595,7 +595,6 @@ bool GCMemcardDirectory::SetUsedBlocks(int save_index)
|
||||||
void GCMemcardDirectory::FlushToFile()
|
void GCMemcardDirectory::FlushToFile()
|
||||||
{
|
{
|
||||||
std::unique_lock l(m_write_mutex);
|
std::unique_lock l(m_write_mutex);
|
||||||
int errors = 0;
|
|
||||||
Memcard::DEntry invalid;
|
Memcard::DEntry invalid;
|
||||||
for (Memcard::GCIFile& save : m_saves)
|
for (Memcard::GCIFile& save : m_saves)
|
||||||
{
|
{
|
||||||
|
@ -644,12 +643,18 @@ void GCMemcardDirectory::FlushToFile()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
++errors;
|
|
||||||
Core::DisplayMessage(
|
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);
|
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)
|
else if (save.m_filename.length() != 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue