-moved mem2 init to the beginning of wiiflow booting

-allocating dml config in mem1 since we write it to mem1 anyways,
no need to unneeded move stuff from one mem to the other
This commit is contained in:
fix94.1 2012-05-18 20:13:26 +00:00
parent f8a214fb3d
commit 322099c826
2 changed files with 4 additions and 4 deletions

View File

@ -150,7 +150,7 @@ void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, boo
{
gprintf("Wiiflow DML: Launch game 'sd:/games/%s/game.iso' through memory (new method)\n", GamePath);
DMLCfg = (DML_CFG*)MEM2_alloc(sizeof(DML_CFG));
DMLCfg = (DML_CFG*)MEM1_alloc(sizeof(DML_CFG));
if(DMLCfg == NULL)
return;
memset(DMLCfg, 0, sizeof(DML_CFG));
@ -223,7 +223,7 @@ void DML_New_SetBootDiscOption()
{
gprintf("Booting GC game\n");
DMLCfg = (DML_CFG*)MEM2_alloc(sizeof(DML_CFG));
DMLCfg = (DML_CFG*)MEM1_alloc(sizeof(DML_CFG));
if(DMLCfg == NULL)
return;
memset(DMLCfg, 0, sizeof(DML_CFG));
@ -247,5 +247,5 @@ void DML_New_WriteOptions()
memcpy((void *)0x81200000, DMLCfg, sizeof(DML_CFG));
DCFlushRange((void *)(0x81200000), sizeof(DML_CFG));
MEM2_free(DMLCfg);
MEM1_free(DMLCfg);
}

View File

@ -37,12 +37,12 @@ int main(int argc, char **argv)
{
__exception_setreload(5);
MEM1_init((void*)0x80003f00, (void*)0x80b00000);
MEM2_init(52);
// Init video
CVideo vid;
vid.init();
MEM2_init(52);
geckoinit = InitGecko();
gprintf(" \nWelcome to %s (%s-r%s)!\nThis is the debug output.\n", APP_NAME, APP_VERSION, SVN_REV);
vid.waitMessage(0.2f);