don't auto-patch DLDI unless game code is ####

This commit is contained in:
zeromus 2010-07-06 04:05:24 +00:00
parent 68a0e791db
commit 49689be1ce
1 changed files with 4 additions and 3 deletions

View File

@ -464,9 +464,6 @@ int NDS_LoadROM(const char *filename, const char *logicalFilename)
return -1;
}
//try auto-patching DLDI. should be benign if there is no DLDI or if it fails
DLDI::tryPatch((void*)gameInfo.romdata, gameInfo.romsize);
//decrypt if necessary..
//but this is untested and suspected to fail on big endian, so lets not support this on big endian
@ -508,6 +505,10 @@ int NDS_LoadROM(const char *filename, const char *logicalFilename)
INFO("ROM serial: %s\n", gameInfo.ROMserial);
INFO("ROM internal name: %s\n\n", gameInfo.ROMname);
//for homebrew, try auto-patching DLDI. should be benign if there is no DLDI or if it fails
if(!memcmp(gameInfo.header.gameCode,"####",4))
DLDI::tryPatch((void*)gameInfo.romdata, gameInfo.romsize);
return 1;
}
#else