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:
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -555,7 +555,7 @@ namespace Gen
|
||||
}
|
||||
}
|
||||
|
||||
void POP(int bits, const OpArg ®)
|
||||
void POP(int /*bits*/, const OpArg ®)
|
||||
{
|
||||
if (reg.IsSimpleReg())
|
||||
POP(reg.GetSimpleReg());
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user