fix autodldi in linux and fix attempt to load savestate -1 in linux-cli

This commit is contained in:
zeromus 2010-09-03 11:13:27 +00:00
parent 8cf436f9f8
commit 2a91ec3c9c
2 changed files with 7 additions and 1 deletions

View File

@ -508,6 +508,7 @@ int NDS_LoadROM(const char *filename, const char *logicalFilename)
INFO("\nROM crc: %08X\n", gameInfo.crc);
INFO("ROM serial: %s\n", gameInfo.ROMserial);
INFO("ROM internal name: %s\n\n", gameInfo.ROMname);
INFO("ROM game code: %c%c%c%c\n\n", gameInfo.header.gameCode[0], gameInfo.header.gameCode[1], gameInfo.header.gameCode[2], gameInfo.header.gameCode[3]);
//for homebrew, try auto-patching DLDI. should be benign if there is no DLDI or if it fails
if(!memcmp(gameInfo.header.gameCode,"####",4))
@ -624,6 +625,11 @@ int NDS_LoadROM(const char *filename, const char *logicalFilename)
INFO("\nROM crc: %08X\n", gameInfo.crc);
INFO("ROM serial: %s\n", gameInfo.ROMserial);
INFO("ROM internal name: %s\n\n", gameInfo.ROMname);
INFO("ROM game code: %c%c%c%c\n\n", gameInfo.header.gameCode[0], gameInfo.header.gameCode[1], gameInfo.header.gameCode[2], gameInfo.header.gameCode[3]);
//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*)data, gameInfo.mask + 1);
return ret;
}

View File

@ -747,7 +747,7 @@ int main(int argc, char ** argv) {
}
}
if(my_config.load_slot){
if(my_config.load_slot != -1){
loadstate_slot(my_config.load_slot);
}