NDSSystem: fixup indendation in NDS_LoadROM for windows
This commit is contained in:
parent
0aa0b07733
commit
1b1d4acdd3
|
@ -436,7 +436,7 @@ int NDS_LoadROM(const char *filename, const char *logicalFilename)
|
||||||
if (filename == NULL)
|
if (filename == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
path.init(logicalFilename);
|
path.init(logicalFilename);
|
||||||
|
|
||||||
if ( path.isdsgba(path.path)) {
|
if ( path.isdsgba(path.path)) {
|
||||||
type = ROM_DSGBA;
|
type = ROM_DSGBA;
|
||||||
|
@ -493,29 +493,29 @@ int NDS_LoadROM(const char *filename, const char *logicalFilename)
|
||||||
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]);
|
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
|
||||||
bool isHomebrew = !memcmp(gameInfo.header.gameCode,"####",4);
|
bool isHomebrew = !memcmp(gameInfo.header.gameCode,"####",4);
|
||||||
if(isHomebrew)
|
if(isHomebrew)
|
||||||
DLDI::tryPatch((void*)gameInfo.romdata, gameInfo.romsize);
|
DLDI::tryPatch((void*)gameInfo.romdata, gameInfo.romsize);
|
||||||
|
|
||||||
NDS_Reset();
|
NDS_Reset();
|
||||||
|
|
||||||
//put garbage in vram for homebrew games, to help mimic the situation where libnds does not clear out junk
|
//put garbage in vram for homebrew games, to help mimic the situation where libnds does not clear out junk
|
||||||
//which the card's launcher may or may not have left behind
|
//which the card's launcher may or may not have left behind
|
||||||
if(isHomebrew)
|
if(isHomebrew)
|
||||||
{
|
{
|
||||||
u32 w=100000,x=99,y=117,z=19382173;
|
u32 w=100000,x=99,y=117,z=19382173;
|
||||||
for(int i=0;i<sizeof(MMU.ARM9_LCD);i++)
|
for(int i=0;i<sizeof(MMU.ARM9_LCD);i++)
|
||||||
{
|
{
|
||||||
u32 t= (x^(x<<11));
|
u32 t= (x^(x<<11));
|
||||||
x=y;
|
x=y;
|
||||||
y=z;
|
y=z;
|
||||||
z=w;
|
z=w;
|
||||||
t = (w= (w^(w>>19))^(t^(t>>8)));
|
t = (w= (w^(w>>19))^(t^(t>>8)));
|
||||||
MMU.ARM9_LCD[i] = t;
|
MMU.ARM9_LCD[i] = t;
|
||||||
if(i<sizeof(MMU.ARM9_VMEM))
|
if (i<sizeof(MMU.ARM9_VMEM))
|
||||||
MMU.ARM9_VMEM[i] = t;
|
MMU.ARM9_VMEM[i] = t;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(buf, 0, MAX_PATH);
|
memset(buf, 0, MAX_PATH);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue