mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
-added new option in DML section in wiiflow.ini, dm_r2.1+,
enabled by default, with the option enabled it will use cfg version 2 for dm 2.1 or higher, if disabled it uses cfg version 1. It will be ignored if dml_r52+ is set to no since that uses the old boot.bin method then
This commit is contained in:
parent
3ade778445
commit
321a398151
@ -19,7 +19,7 @@
|
||||
// DIOS-MIOS
|
||||
DML_CFG *DMLCfg = NULL;
|
||||
|
||||
void DML_New_SetOptions(const char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats, bool debugger, u8 NMM, u8 nodisc, u8 DMLvideoMode, u8 videoSetting)
|
||||
void DML_New_SetOptions(const char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats, bool debugger, u8 NMM, u8 nodisc, u8 DMLvideoMode, u8 videoSetting, bool new_dm_cfg)
|
||||
{
|
||||
gprintf("Wiiflow GC: Launch game '%s' through memory (new method)\n", GamePath);
|
||||
|
||||
@ -29,7 +29,11 @@ void DML_New_SetOptions(const char *GamePath, char *CheatPath, char *NewCheatPat
|
||||
memset(DMLCfg, 0, sizeof(DML_CFG));
|
||||
|
||||
DMLCfg->Magicbytes = 0xD1050CF6;
|
||||
DMLCfg->CfgVersion = 0x00000001;
|
||||
if(new_dm_cfg)
|
||||
DMLCfg->CfgVersion = 0x00000002;
|
||||
else
|
||||
DMLCfg->CfgVersion = 0x00000001;
|
||||
|
||||
if(videoSetting == 0)
|
||||
DMLCfg->VideoMode |= DML_VID_NONE;
|
||||
else if(videoSetting == 1)
|
||||
@ -94,7 +98,7 @@ void DML_Old_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, boo
|
||||
*(vu32*)0xCC003024 |= 7;
|
||||
}
|
||||
|
||||
void DML_New_SetBootDiscOption()
|
||||
void DML_New_SetBootDiscOption(bool new_dm_cfg)
|
||||
{
|
||||
gprintf("Booting GC game\n");
|
||||
|
||||
@ -104,7 +108,10 @@ void DML_New_SetBootDiscOption()
|
||||
memset(DMLCfg, 0, sizeof(DML_CFG));
|
||||
|
||||
DMLCfg->Magicbytes = 0xD1050CF6;
|
||||
DMLCfg->CfgVersion = 0x00000001;
|
||||
if(new_dm_cfg)
|
||||
DMLCfg->CfgVersion = 0x00000002;
|
||||
else
|
||||
DMLCfg->CfgVersion = 0x00000001;
|
||||
DMLCfg->VideoMode |= DML_VID_DML_AUTO;
|
||||
|
||||
DMLCfg->Config |= DML_CFG_BOOT_DISC;
|
||||
|
@ -46,9 +46,9 @@ enum dmlvideomode
|
||||
DML_VID_PROG_PATCH = (1<<4),
|
||||
};
|
||||
|
||||
void DML_New_SetOptions(const char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats, bool debugger, u8 NMM, u8 nodisc, u8 DMLvideoMode, u8 videoSetting);
|
||||
void DML_New_SetOptions(const char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats, bool debugger, u8 NMM, u8 nodisc, u8 DMLvideoMode, u8 videoSetting, bool new_dm_cfg);
|
||||
void DML_Old_SetOptions(char *GamePath, char *CheatPath, char *NewCheatPath, bool cheats);
|
||||
void DML_New_SetBootDiscOption();
|
||||
void DML_New_SetBootDiscOption(bool new_dm_cfg);
|
||||
void DML_New_WriteOptions();
|
||||
|
||||
|
||||
|
@ -270,6 +270,7 @@ void CMenu::init(void)
|
||||
m_show_dml = MIOSisDML();
|
||||
|
||||
m_new_dml = m_cfg.getBool("DML", "dml_r52+", true);
|
||||
m_new_dm_cfg = m_cfg.getBool("DML", "dm_r2.1+", true);
|
||||
m_DMLgameDir = sfmt("%%s:/%s", m_cfg.getString("DML", "dir_usb_games", "games").c_str());
|
||||
|
||||
m_cfg.getString("NAND", "path", "");
|
||||
|
@ -179,6 +179,7 @@ private:
|
||||
u8 m_show_dml;
|
||||
bool m_devo_installed;
|
||||
bool m_new_dml;
|
||||
bool m_new_dm_cfg;
|
||||
bool m_GameTDBLoaded;
|
||||
//Main Config menus
|
||||
u16 m_configLblPage;
|
||||
|
@ -817,7 +817,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
if(disc)
|
||||
{
|
||||
loader = 0;
|
||||
DML_New_SetBootDiscOption();
|
||||
DML_New_SetBootDiscOption(m_new_dm_cfg);
|
||||
}
|
||||
else if(loader == 1 || (loader == 0 && (strcasestr(path.c_str(), "boot.bin") != NULL || !m_devo_installed)))
|
||||
{
|
||||
@ -845,7 +845,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
else
|
||||
newPath = &path[path.find_first_of(":/")+1];
|
||||
if(m_new_dml)
|
||||
DML_New_SetOptions(newPath.c_str(), CheatPath, NewCheatPath, cheats, DML_debug, NMM, nodisc, videoMode, videoSetting);
|
||||
DML_New_SetOptions(newPath.c_str(), CheatPath, NewCheatPath, cheats, DML_debug, NMM, nodisc, videoMode, videoSetting, m_new_dm_cfg);
|
||||
else
|
||||
DML_Old_SetOptions((char*)path.c_str(), CheatPath, NewCheatPath, cheats);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user