-added new option in DML section in wiiflow.ini,

no_disc_patch, its enabled by default, that means
you don't need to have a disc inserted anymore when
playing gamecube games (requires dml r55 or later to work)
(per game option will follow)
This commit is contained in:
fix94.1 2012-03-16 21:36:49 +00:00
parent e7a2bbb448
commit 88aea82b45
3 changed files with 7 additions and 3 deletions

View File

@ -114,7 +114,7 @@ bool GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgame
return false; return false;
} }
void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool debugger, u8 NMM, bool cheats) void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool debugger, u8 NMM, bool cheats, bool nodisc)
{ {
gprintf("Wiiflow DML: Launch game 'sd:/games/%s/game.iso' through memory (new method)\n", GamePath); gprintf("Wiiflow DML: Launch game 'sd:/games/%s/game.iso' through memory (new method)\n", GamePath);
@ -150,6 +150,8 @@ void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, boo
DMLCfg->Config |= DML_CFG_NMM; DMLCfg->Config |= DML_CFG_NMM;
if(NMM > 1) if(NMM > 1)
DMLCfg->Config |= DML_CFG_NMM_DEBUG; DMLCfg->Config |= DML_CFG_NMM_DEBUG;
if(nodisc)
DMLCfg->Config |= DML_CFG_NODISC;
//Write options into memory //Write options into memory
memcpy((void *)0xC0001700, DMLCfg, sizeof(DML_CFG)); memcpy((void *)0xC0001700, DMLCfg, sizeof(DML_CFG));

View File

@ -27,6 +27,7 @@ enum dmlconfig
DML_CFG_CHEAT_PATH = (1<<6), DML_CFG_CHEAT_PATH = (1<<6),
DML_CFG_ACTIVITY_LED= (1<<7), DML_CFG_ACTIVITY_LED= (1<<7),
DML_CFG_PADHOOK = (1<<8), DML_CFG_PADHOOK = (1<<8),
DML_CFG_NODISC = (1<<9),
}; };
enum dmlvideomode enum dmlvideomode
@ -44,7 +45,7 @@ enum dmlvideomode
void GC_SetVideoMode(int i); void GC_SetVideoMode(int i);
void GC_SetLanguage(u8 lang); void GC_SetLanguage(u8 lang);
bool GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgamedir); bool GC_GameIsInstalled(char *discid, const char* partition, const char* dmlgamedir);
void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool debugger, u8 NMM, bool cheats); void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool debugger, u8 NMM, bool cheats, bool nodisc);
void DML_Old_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats); void DML_Old_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats);
#endif //GC_H_ #endif //GC_H_

View File

@ -655,6 +655,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool DML)
NMM--; NMM--;
bool cheats = m_gcfg2.testOptBool(id, "cheat", m_cfg.getBool("DML", "cheat", false)); bool cheats = m_gcfg2.testOptBool(id, "cheat", m_cfg.getBool("DML", "cheat", false));
bool DML_debug = m_gcfg2.getBool(id, "debugger", false); bool DML_debug = m_gcfg2.getBool(id, "debugger", false);
bool nodisc = m_cfg.getBool("DML", "no_disc_patch", true);
if(cheats) if(cheats)
{ {
@ -663,7 +664,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool DML)
} }
if(m_new_dml) if(m_new_dml)
DML_New_SetOptions(hdr->path, CheatPath, NewCheatPath, DML_debug, NMM, cheats); DML_New_SetOptions(hdr->path, CheatPath, NewCheatPath, DML_debug, NMM, cheats, nodisc);
else else
DML_Old_SetOptions(hdr->path, CheatPath, NewCheatPath, cheats); DML_Old_SetOptions(hdr->path, CheatPath, NewCheatPath, cheats);
DMLvideoMode = min((u32)m_gcfg2.getInt(id, "dml_video_mode", 0), ARRAY_SIZE(CMenu::_DMLvideoModes) - 1u); DMLvideoMode = min((u32)m_gcfg2.getInt(id, "dml_video_mode", 0), ARRAY_SIZE(CMenu::_DMLvideoModes) - 1u);