- 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:
NunoRamiro
2008-08-17 19:28:24 +00:00
parent e3f3a7a41d
commit 8c132bdae5
19 changed files with 429 additions and 152 deletions

View File

@ -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);
}

View File

@ -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.