mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
- Fixed: Crash when loading a rom with an unknown file extension.
- Fixed: Crash when stopping a game. - Improved: DirectX Plugin. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@237 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -56,6 +56,7 @@ CEXIMemoryCard::CEXIMemoryCard(const std::string& _rName, const std::string& _rF
|
||||
{
|
||||
LOG(EXPANSIONINTERFACE, "No memory card found. Will create new.");
|
||||
Flush();
|
||||
Core::DisplayMessage(StringFromFormat("Wrote memory card contents to %s", m_strFilename.c_str()), 4000);
|
||||
}
|
||||
|
||||
formatDelay = 0;
|
||||
@ -84,14 +85,13 @@ void CEXIMemoryCard::Flush()
|
||||
}
|
||||
fwrite(memory_card_content, memory_card_size, 1, pFile);
|
||||
fclose(pFile);
|
||||
|
||||
Core::DisplayMessage(StringFromFormat("Wrote memory card contents to %s", m_strFilename.c_str()), 4000);
|
||||
}
|
||||
|
||||
void CEXIMemoryCard::FlushCallback(u64 userdata, int cyclesLate)
|
||||
{
|
||||
CEXIMemoryCard *ptr = reinterpret_cast<CEXIMemoryCard*>(userdata);
|
||||
ptr->Flush();
|
||||
Core::DisplayMessage(StringFromFormat("Wrote memory card contents to %s", ptr->GetFileName().c_str()), 4000);
|
||||
}
|
||||
|
||||
|
||||
|
@ -36,6 +36,8 @@ public:
|
||||
//! Is device present?
|
||||
bool IsPresent();
|
||||
|
||||
inline const std::string &GetFileName() const { return m_strFilename; };
|
||||
|
||||
private:
|
||||
// This is scheduled whenever a page write is issued. The this pointer is passed
|
||||
// through the userdata parameter, so that it can then call Flush on the right card.
|
||||
|
Reference in New Issue
Block a user