diff --git a/.gitignore b/.gitignore index 064cf7666..1ac096f48 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,9 @@ xcuserdata/ *.ipa *.dSYM.zip *.dSYM + +## Eclipse CDT generated files +/.autotools +/.cproject +/config.log +/.project diff --git a/desmume/src/NDSSystem.cpp b/desmume/src/NDSSystem.cpp index 667d02744..3b8129d89 100644 --- a/desmume/src/NDSSystem.cpp +++ b/desmume/src/NDSSystem.cpp @@ -658,8 +658,16 @@ struct LastRom { int NDS_LoadROM(const char *filename, const char *physicalName, const char *logicalFilename) { lastRom.filename = filename; - lastRom.physicalName = physicalName; - lastRom.logicalFilename = logicalFilename; + + if (physicalName != NULL ) + { + lastRom.physicalName = physicalName; + } + + if (logicalFilename != NULL) + { + lastRom.logicalFilename = logicalFilename; + } int ret; char buf[MAX_PATH]; @@ -3137,4 +3145,4 @@ void TCommonSettings::GameHacks::apply() void TCommonSettings::GameHacks::clear() { memset(&flags,0,sizeof(flags)); -} \ No newline at end of file +}