fix autodldi in linux and fix attempt to load savestate -1 in linux-cli
This commit is contained in:
parent
8cf436f9f8
commit
2a91ec3c9c
|
@ -508,6 +508,7 @@ int NDS_LoadROM(const char *filename, const char *logicalFilename)
|
||||||
INFO("\nROM crc: %08X\n", gameInfo.crc);
|
INFO("\nROM crc: %08X\n", gameInfo.crc);
|
||||||
INFO("ROM serial: %s\n", gameInfo.ROMserial);
|
INFO("ROM serial: %s\n", gameInfo.ROMserial);
|
||||||
INFO("ROM internal name: %s\n\n", gameInfo.ROMname);
|
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
|
//for homebrew, try auto-patching DLDI. should be benign if there is no DLDI or if it fails
|
||||||
if(!memcmp(gameInfo.header.gameCode,"####",4))
|
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("\nROM crc: %08X\n", gameInfo.crc);
|
||||||
INFO("ROM serial: %s\n", gameInfo.ROMserial);
|
INFO("ROM serial: %s\n", gameInfo.ROMserial);
|
||||||
INFO("ROM internal name: %s\n\n", gameInfo.ROMname);
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
loadstate_slot(my_config.load_slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue