-we should only use cheats in dml if we have set

cheats to enabled ;)
This commit is contained in:
fix94.1 2012-03-11 19:59:15 +00:00
parent f10550a11d
commit c87c2f8048
3 changed files with 8 additions and 8 deletions

View File

@ -114,7 +114,7 @@ bool GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgame
return false;
}
void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool debugger, bool NMM, bool NMM_debug)
void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool debugger, bool NMM, bool NMM_debug, bool cheats)
{
gprintf("Wiiflow DML: Launch game 'sd:/games/%s/game.iso' through memory (new method)\n", GamePath);
@ -127,7 +127,7 @@ void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, boo
DMLCfg->VideoMode |= DML_VID_NONE;
DMLCfg->Config |= DML_CFG_GAME_PATH;
if(CheatPath)
if(cheats)
{
char *ptr;
if(strstr(CheatPath, "sd:/") == NULL)
@ -154,7 +154,7 @@ void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, boo
MEM2_free(DMLCfg);
}
void DML_Old_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath)
void DML_Old_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats)
{
gprintf("Wiiflow DML: Launch game 'sd:/games/%s/game.iso' through boot.bin (old method)\n", GamePath);
FILE *f;
@ -162,7 +162,7 @@ void DML_Old_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath)
fwrite(GamePath, 1, strlen(GamePath) + 1, f);
fclose(f);
if(CheatPath && strstr(CheatPath, NewCheatPath) == NULL)
if(cheats && strstr(CheatPath, NewCheatPath) == NULL)
fsop_CopyFile(CheatPath, NewCheatPath, NULL, NULL);
//Tell DML to boot the game from sd card

View File

@ -44,8 +44,8 @@ enum dmlvideomode
void GC_SetVideoMode(int i);
void GC_SetLanguage(u8 lang);
bool GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgamedir);
void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool debugger, bool NMM, bool NMM_debug);
void DML_Old_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath);
void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool debugger, bool NMM, bool NMM_debug, bool cheats);
void DML_Old_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats);
#endif //GC_H_
#ifdef __cplusplus

View File

@ -652,9 +652,9 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool DML)
}
if(m_new_dml)
DML_New_SetOptions(hdr->path, CheatPath, NewCheatPath, DML_debug, NMM, NMM_debug);
DML_New_SetOptions(hdr->path, CheatPath, NewCheatPath, DML_debug, NMM, NMM_debug, cheats);
else
DML_Old_SetOptions(hdr->path, CheatPath, NewCheatPath);
DML_Old_SetOptions(hdr->path, CheatPath, NewCheatPath, cheats);
DMLvideoMode = min((u32)m_gcfg2.getInt(id, "dml_video_mode", 0), ARRAY_SIZE(CMenu::_DMLvideoModes) - 1u);
if(DMLvideoMode == 0)
DMLvideoMode = min((u32)m_cfg.getInt("DML", "video_mode", 0), ARRAY_SIZE(CMenu::_GlobalDMLvideoModes) - 1u);