mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
Better error messages, Dolphin will create save directories if not present.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@37 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -432,11 +432,9 @@ void Callback_VideoCopiedToXFB()
|
||||
idleTicks = newIdleTicks;
|
||||
|
||||
float t = (float)(Timer.GetTimeDifference()) / 1000.f;
|
||||
char isoName[64];
|
||||
isoName[0] = 0x00;
|
||||
char temp[256];
|
||||
sprintf(temp, "%s - FPS: %8.2f - %s - %i MHz (%i real, %i idle skipped) out of %i MHz",
|
||||
isoName, (float)frames / t,
|
||||
sprintf(temp, "FPS: %8.2f - %s - %i MHz (%i real, %i idle skipped) out of %i MHz",
|
||||
(float)frames / t,
|
||||
g_CoreStartupParameter.bUseDynarec ? "JIT" : "Interpreter",
|
||||
(int)(diff),
|
||||
(int)(diff-idleDiff),
|
||||
|
@ -45,9 +45,13 @@ const unsigned char sram_dump_german[64] ={
|
||||
0x00, 0x00, 0x84, 0xFF, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
static const char iplver[0x100] = "(C) 1999-2001 Nintendo. All rights reserved."
|
||||
"(C) 1999 ArtX Inc. All rights reserved."
|
||||
"PAL Revision 1.0 ";
|
||||
|
||||
// We should provide an option to choose from the above, or figure out the checksum (the algo in yagcd seems wrong)
|
||||
// so that people can change default language.
|
||||
|
||||
static const char iplver[0x100] = "(C) 1999-2001 Nintendo. All rights reserved."
|
||||
"(C) 1999 ArtX Inc. All rights reserved."
|
||||
"PAL Revision 1.0 ";
|
||||
|
||||
CEXIIPL::CEXIIPL() :
|
||||
m_uPosition(0),
|
||||
|
@ -15,6 +15,9 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "Common.h"
|
||||
#include "FileUtil.h"
|
||||
#include "StringUtil.h"
|
||||
#include "../Core.h"
|
||||
#include "../CoreTiming.h"
|
||||
|
||||
@ -52,7 +55,7 @@ CEXIMemoryCard::CEXIMemoryCard(const std::string& _rName, const std::string& _rF
|
||||
else
|
||||
{
|
||||
LOG(EXPANSIONINTERFACE, "No memory card found. Will create new.");
|
||||
//MessageBox(0, "Could not read memory card file - starting with corrupt", m_strFilename.c_str(),0);
|
||||
Flush();
|
||||
}
|
||||
|
||||
formatDelay = 0;
|
||||
@ -66,16 +69,21 @@ void CEXIMemoryCard::Flush()
|
||||
{
|
||||
FILE* pFile = NULL;
|
||||
pFile = fopen(m_strFilename.c_str(), "wb");
|
||||
if (pFile)
|
||||
if (!pFile)
|
||||
{
|
||||
fwrite(memory_card_content, memory_card_size, 1, pFile);
|
||||
fclose(pFile);
|
||||
std::string dir;
|
||||
SplitPath(m_strFilename, &dir, 0, 0);
|
||||
File::CreateDir(dir);
|
||||
pFile = fopen(m_strFilename.c_str(), "wb");
|
||||
}
|
||||
else
|
||||
if (!pFile) //Note - pFile changed inside above if
|
||||
{
|
||||
PanicAlert("Could not write memory card file %s.\n\n"
|
||||
"Are you running Dolphin from a CD/DVD, or is the save file maybe write protected?", m_strFilename.c_str());
|
||||
return;
|
||||
}
|
||||
fwrite(memory_card_content, memory_card_size, 1, pFile);
|
||||
fclose(pFile);
|
||||
}
|
||||
|
||||
void CEXIMemoryCard::FlushCallback(u64 userdata, int cyclesLate)
|
||||
|
Reference in New Issue
Block a user