-added full DML v1.2+ support, you can use all options

like no disc patch and NMM again directly from wiiflow,
also launching of new GCReEx format works fine
This commit is contained in:
fix94.1 2012-04-24 19:42:18 +00:00
parent b34145054e
commit 5881ce5c8c
2 changed files with 16 additions and 6 deletions

View File

@ -117,7 +117,7 @@ void GC_SetLanguage(u8 lang)
while(!__SYS_SyncSram());
}
bool GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgamedir)
int GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgamedir)
{
char folder[50];
char source[300];
@ -129,7 +129,7 @@ bool GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgame
{
gprintf("Found on %s: %s\n", partition, source);
fclose(f);
return true;
return 1;
}
else
{
@ -139,10 +139,10 @@ bool GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgame
{
gprintf("Found on %s: %s\n", partition, source);
fclose(f);
return true;
return 2;
}
}
return false;
return 0;
}
void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats, bool debugger, u8 NMM, u8 nodisc) //, u8 DMLvideoMode)
@ -162,7 +162,10 @@ void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, boo
if(GamePath != NULL)
{
snprintf(DMLCfg->GamePath, sizeof(DMLCfg->GamePath), "/games/%s/game.iso", GamePath);
if(GC_GameIsInstalled(GamePath, "sd", "%s:/games") == 2)
snprintf(DMLCfg->GamePath, sizeof(DMLCfg->GamePath), "/games/%s/", GamePath);
else
snprintf(DMLCfg->GamePath, sizeof(DMLCfg->GamePath), "/games/%s/game.iso", GamePath);
DMLCfg->Config |= DML_CFG_GAME_PATH;
}
@ -204,6 +207,10 @@ void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, boo
//Write options into memory
memcpy((void *)0xC0001700, DMLCfg, sizeof(DML_CFG));
//DML v1.2+
memcpy((void *)0xC1200000, DMLCfg, sizeof(DML_CFG));
MEM2_free(DMLCfg);
}

View File

@ -28,6 +28,8 @@ enum dmlconfig
DML_CFG_ACTIVITY_LED= (1<<7),
DML_CFG_PADHOOK = (1<<8),
DML_CFG_NODISC = (1<<9),
DML_CFG_BOOT_DISC = (1<<10),
DML_CFG_BOOT_DOL = (1<<11),
};
enum dmlvideomode
@ -40,11 +42,12 @@ enum dmlvideomode
DML_VID_FORCE_PAL60 = (1<<1),
DML_VID_FORCE_NTSC = (1<<2),
DML_VID_FORCE_PROG = (1<<3),
DML_VID_PROG_PATCH = (1<<4),
};
void GC_SetVideoMode(u8 videomode);
void GC_SetLanguage(u8 lang);
bool GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgamedir);
int GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgamedir);
void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats, bool debugger, u8 NMM, u8 nodisc); //, u8 DMLvideoMode);
void DML_Old_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats);
#endif //GC_H_