- 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

@ -28,7 +28,7 @@ bool File::IsDirectory(const std::string &filename) {
std::string SanitizePath(const std::string &filename) {
std::string copy = filename;
for (int i = 0; i < copy.size(); i++)
for (size_t i = 0; i < copy.size(); i++)
if (copy[i] == '/')
copy[i] = '\\';
return copy;
@ -81,4 +81,4 @@ bool File::CreateDir(const std::string &path)
#else
// TODO: Insert POSIX code here.
#endif
}
}

View File

@ -323,7 +323,7 @@ bool IniFile::Load(const char* filename)
{
if (line[0] == '[')
{
int endpos = (int)line.find("]");
size_t endpos = line.find("]");
if (endpos != std::string::npos)
{

View File

@ -555,7 +555,7 @@ namespace Gen
}
}
void POP(int bits, const OpArg &reg)
void POP(int /*bits*/, const OpArg &reg)
{
if (reg.IsSimpleReg())
POP(reg.GetSimpleReg());

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.

View File

@ -70,7 +70,10 @@ bool BootCore(const std::string& _rFilename)
#endif
#endif
StartUp.AutoSetup(SCoreStartupParameter::BOOT_DEFAULT);
if ( !StartUp.AutoSetup(SCoreStartupParameter::BOOT_DEFAULT) )
{
return false;
}
// Load overrides
IniFile ini;

View File

@ -195,7 +195,7 @@ void CFrame::CreateMenu()
pOptionsMenu->Append(IDM_CONFIG_PAD_PLUGIN, _T("&PAD settings"));
pOptionsMenu->AppendSeparator();
pOptionsMenu->Append(IDM_TOGGLE_FULLSCREEN, _T("&Fullscreen"));
pOptionsMenu->AppendCheckItem(IDM_TOGGLE_DUALCORE, _T("&Dual-core (instable!)"));
pOptionsMenu->AppendCheckItem(IDM_TOGGLE_DUALCORE, _T("&Dual-core (unstable!)"));
pOptionsMenu->Check(IDM_TOGGLE_DUALCORE, SConfig::GetInstance().m_LocalCoreStartupParameter.bUseDualCore);
pOptionsMenu->AppendCheckItem(IDM_TOGGLE_THROTTLE, _T("&Enable throttle"));
pOptionsMenu->Check(IDM_TOGGLE_THROTTLE, SConfig::GetInstance().m_LocalCoreStartupParameter.bThrottle);