From c87c2f8048bb61e326f40772c6416518e36e24a0 Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Sun, 11 Mar 2012 19:59:15 +0000 Subject: [PATCH] -we should only use cheats in dml if we have set cheats to enabled ;) --- source/gc/gc.c | 8 ++++---- source/gc/gc.h | 4 ++-- source/menu/menu_game.cpp | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/gc/gc.c b/source/gc/gc.c index b851851c..5fc033e1 100644 --- a/source/gc/gc.c +++ b/source/gc/gc.c @@ -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 diff --git a/source/gc/gc.h b/source/gc/gc.h index 13c7832e..a05724f4 100644 --- a/source/gc/gc.h +++ b/source/gc/gc.h @@ -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 diff --git a/source/menu/menu_game.cpp b/source/menu/menu_game.cpp index 7a3e5100..03e36630 100644 --- a/source/menu/menu_game.cpp +++ b/source/menu/menu_game.cpp @@ -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);