From 88aea82b4557fef1a596b0e889f998633a94e9d3 Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Fri, 16 Mar 2012 21:36:49 +0000 Subject: [PATCH] -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) --- source/gc/gc.c | 4 +++- source/gc/gc.h | 3 ++- source/menu/menu_game.cpp | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/gc/gc.c b/source/gc/gc.c index b8a1b73a..d68e077e 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, 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); @@ -150,6 +150,8 @@ void DML_New_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, boo DMLCfg->Config |= DML_CFG_NMM; if(NMM > 1) DMLCfg->Config |= DML_CFG_NMM_DEBUG; + if(nodisc) + DMLCfg->Config |= DML_CFG_NODISC; //Write options into memory memcpy((void *)0xC0001700, DMLCfg, sizeof(DML_CFG)); diff --git a/source/gc/gc.h b/source/gc/gc.h index 6c484378..82353a98 100644 --- a/source/gc/gc.h +++ b/source/gc/gc.h @@ -27,6 +27,7 @@ enum dmlconfig DML_CFG_CHEAT_PATH = (1<<6), DML_CFG_ACTIVITY_LED= (1<<7), DML_CFG_PADHOOK = (1<<8), + DML_CFG_NODISC = (1<<9), }; enum dmlvideomode @@ -44,7 +45,7 @@ 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, 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); #endif //GC_H_ diff --git a/source/menu/menu_game.cpp b/source/menu/menu_game.cpp index 50972fc3..0538e971 100644 --- a/source/menu/menu_game.cpp +++ b/source/menu/menu_game.cpp @@ -655,6 +655,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool DML) NMM--; bool cheats = m_gcfg2.testOptBool(id, "cheat", m_cfg.getBool("DML", "cheat", false)); bool DML_debug = m_gcfg2.getBool(id, "debugger", false); + bool nodisc = m_cfg.getBool("DML", "no_disc_patch", true); if(cheats) { @@ -663,7 +664,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool 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 DML_Old_SetOptions(hdr->path, CheatPath, NewCheatPath, cheats); DMLvideoMode = min((u32)m_gcfg2.getInt(id, "dml_video_mode", 0), ARRAY_SIZE(CMenu::_DMLvideoModes) - 1u);