mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-04 18:45:05 +01:00
* Split NoDisc settings in two distinct options to prevent confusion.
* Hide DM config v2 settings when using config v1
This commit is contained in:
parent
6ed3f4e59f
commit
07e916bf5c
@ -2,8 +2,8 @@
|
||||
<app version="1">
|
||||
<name> USB Loader GX</name>
|
||||
<coder>USB Loader GX Team</coder>
|
||||
<version>3.0 r1198</version>
|
||||
<release_date>201207201652</release_date>
|
||||
<version>3.0 r1199</version>
|
||||
<release_date>201207211037</release_date>
|
||||
<!-- // remove this line to enable arguments
|
||||
<arguments>
|
||||
<arg>--ios=250</arg>
|
||||
|
@ -35,25 +35,25 @@ enum DMLConfig
|
||||
DML_CFG_CHEAT_PATH = (1<<6),
|
||||
DML_CFG_ACTIVITY_LED = (1<<7),
|
||||
DML_CFG_PADHOOK = (1<<8),
|
||||
DML_CFG_NODISC = (1<<9), // unused since DML v1.0, removed in v2.1
|
||||
DML_CFG_FORCE_WIDE = (1<<9), // DM v2.1+, Config v02
|
||||
DML_CFG_NODISC = (1<<9), // unused since DML v1.0, removed in v2.1
|
||||
DML_CFG_FORCE_WIDE = (1<<9), // DM v2.1+, Config v02
|
||||
DML_CFG_BOOT_DISC = (1<<10),
|
||||
// DML_CFG_BOOT_DOL = (1<<11), // unused since DML v1.0, removed in v2.1
|
||||
DML_CFG_BOOT_DISC2 = (1<<11), // DM v2.1+, Config v02
|
||||
// DML_CFG_BOOT_DOL = (1<<11), // unused since DML v1.0, removed in v2.1
|
||||
DML_CFG_BOOT_DISC2 = (1<<11), // DM v2.1+, Config v02
|
||||
DML_CFG_NODISC2 = (1<<12) // added back in DM v2.2 update2 (r20)
|
||||
};
|
||||
|
||||
enum DMLVideoModes
|
||||
{
|
||||
DML_VID_DML_AUTO = (0<<16),
|
||||
DML_VID_FORCE = (1<<16),
|
||||
DML_VID_FORCE = (1<<16),
|
||||
DML_VID_NONE = (2<<16),
|
||||
|
||||
DML_VID_FORCE_PAL50 = (1<<0),
|
||||
DML_VID_FORCE_PAL60 = (1<<1),
|
||||
DML_VID_FORCE_NTSC = (1<<2),
|
||||
DML_VID_FORCE_PROG = (1<<3),
|
||||
DML_VID_PROG_PATCH = (1<<4)
|
||||
DML_VID_FORCE_PAL50 = (1<<0),
|
||||
DML_VID_FORCE_PAL60 = (1<<1),
|
||||
DML_VID_FORCE_NTSC = (1<<2),
|
||||
DML_VID_FORCE_PROG = (1<<3),
|
||||
DML_VID_PROG_PATCH = (1<<4)
|
||||
|
||||
};
|
||||
|
||||
|
@ -211,6 +211,7 @@ bool CGameSettings::Save()
|
||||
fprintf(f, "DMLActivityLED:%d; ", GameList[i].DMLActivityLED);
|
||||
fprintf(f, "DMLPADHOOK:%d; ", GameList[i].DMLPADHOOK);
|
||||
fprintf(f, "DMLNoDisc:%d; ", GameList[i].DMLNoDisc);
|
||||
fprintf(f, "DMLNoDisc2:%d; ", GameList[i].DMLNoDisc2);
|
||||
fprintf(f, "DMLWidescreen:%d; ", GameList[i].DMLWidescreen);
|
||||
fprintf(f, "DMLDebug:%d; ", GameList[i].DMLDebug);
|
||||
fprintf(f, "DEVOMCEmulation:%d; ", GameList[i].DEVOMCEmulation);
|
||||
@ -354,6 +355,11 @@ bool CGameSettings::SetSetting(GameCFG & game, const char *name, const char *val
|
||||
game.DMLNoDisc = atoi(value);
|
||||
return true;
|
||||
}
|
||||
else if(strcmp(name, "DMLNoDisc2") == 0)
|
||||
{
|
||||
game.DMLNoDisc2 = atoi(value);
|
||||
return true;
|
||||
}
|
||||
else if(strcmp(name, "DMLWidescreen") == 0)
|
||||
{
|
||||
game.DMLWidescreen = atoi(value);
|
||||
@ -495,6 +501,7 @@ void CGameSettings::SetDefault(GameCFG &game)
|
||||
game.DMLActivityLED = INHERIT;
|
||||
game.DMLPADHOOK = INHERIT;
|
||||
game.DMLNoDisc = INHERIT;
|
||||
game.DMLNoDisc2 = INHERIT;
|
||||
game.DMLWidescreen = INHERIT;
|
||||
game.DMLDebug = INHERIT;
|
||||
game.DEVOMCEmulation = INHERIT;
|
||||
|
@ -35,6 +35,7 @@ typedef struct _GameCFG
|
||||
short DMLActivityLED;
|
||||
short DMLPADHOOK;
|
||||
short DMLNoDisc;
|
||||
short DMLNoDisc2;
|
||||
short DMLWidescreen;
|
||||
short DMLDebug;
|
||||
short DEVOMCEmulation;
|
||||
@ -68,6 +69,7 @@ typedef struct _GameCFG
|
||||
this->DMLActivityLED = game.DMLActivityLED;
|
||||
this->DMLPADHOOK = game.DMLPADHOOK;
|
||||
this->DMLNoDisc = game.DMLNoDisc;
|
||||
this->DMLNoDisc2 = game.DMLNoDisc2;
|
||||
this->DMLWidescreen = game.DMLWidescreen;
|
||||
this->DMLDebug = game.DMLDebug;
|
||||
this->DEVOMCEmulation = game.DEVOMCEmulation;
|
||||
|
@ -173,6 +173,7 @@ void CSettings::SetDefault()
|
||||
DMLActivityLED = OFF;
|
||||
DMLPADHOOK = OFF;
|
||||
DMLNoDisc = OFF;
|
||||
DMLNoDisc2 = OFF;
|
||||
DMLWidescreen = OFF;
|
||||
DMLDebug = OFF;
|
||||
DEVOMCEmulation = OFF;
|
||||
@ -397,6 +398,7 @@ bool CSettings::Save()
|
||||
fprintf(file, "DMLActivityLED = %d\n", DMLActivityLED);
|
||||
fprintf(file, "DMLPADHOOK = %d\n", DMLPADHOOK);
|
||||
fprintf(file, "DMLNoDisc = %d\n", DMLNoDisc);
|
||||
fprintf(file, "DMLNoDisc2 = %d\n", DMLNoDisc2);
|
||||
fprintf(file, "DMLWidescreen = %d\n", DMLWidescreen);
|
||||
fprintf(file, "DMLDebug = %d\n", DMLDebug);
|
||||
fprintf(file, "DEVOMCEmulation = %d\n", DEVOMCEmulation);
|
||||
@ -819,6 +821,11 @@ bool CSettings::SetSetting(char *name, char *value)
|
||||
DMLNoDisc = atoi(value);
|
||||
return true;
|
||||
}
|
||||
else if (strcmp(name, "DMLNoDisc2") == 0)
|
||||
{
|
||||
DMLNoDisc2 = atoi(value);
|
||||
return true;
|
||||
}
|
||||
else if (strcmp(name, "DMLWidescreen") == 0)
|
||||
{
|
||||
DMLWidescreen = atoi(value);
|
||||
|
@ -175,6 +175,7 @@ class CSettings
|
||||
short DMLActivityLED;
|
||||
short DMLPADHOOK;
|
||||
short DMLNoDisc;
|
||||
short DMLNoDisc2;
|
||||
short DMLWidescreen;
|
||||
short DMLDebug;
|
||||
short DEVOMCEmulation;
|
||||
|
@ -157,7 +157,10 @@ void GCGameLoadSM::SetOptionNames()
|
||||
Options->SetName(Idx++, "%s", tr( "DML LED Activity" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML PAD Hook" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML No Disc" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML Force Widescreen" ));
|
||||
if(Settings.DMLConfigVersion > 1)
|
||||
Options->SetName(Idx++, "%s", tr( "DML No Disc+" ));
|
||||
if(Settings.DMLConfigVersion > 1)
|
||||
Options->SetName(Idx++, "%s", tr( "DML Force Widescreen" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML Debug" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DEVO MemCard Emulation" ));
|
||||
}
|
||||
@ -228,11 +231,23 @@ void GCGameLoadSM::SetOptionValues()
|
||||
else
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLNoDisc]));
|
||||
|
||||
//! Settings: DML Extended No Disc
|
||||
if(Settings.DMLConfigVersion > 1)
|
||||
{
|
||||
if(GameConfig.DMLNoDisc2 == INHERIT)
|
||||
Options->SetValue(Idx++, tr("Use global"));
|
||||
else
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLNoDisc2]));
|
||||
}
|
||||
|
||||
//! Settings: DML Force Widescreen
|
||||
if(GameConfig.DMLWidescreen == INHERIT)
|
||||
Options->SetValue(Idx++, tr("Use global"));
|
||||
else
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLWidescreen]));
|
||||
if(Settings.DMLConfigVersion > 1)
|
||||
{
|
||||
if(GameConfig.DMLWidescreen == INHERIT)
|
||||
Options->SetValue(Idx++, tr("Use global"));
|
||||
else
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLWidescreen]));
|
||||
}
|
||||
|
||||
//! Settings: DML Debug
|
||||
if(GameConfig.DMLDebug == INHERIT)
|
||||
@ -344,8 +359,14 @@ int GCGameLoadSM::GetMenuInternal()
|
||||
if (++GameConfig.DMLNoDisc >= MAX_ON_OFF) GameConfig.DMLNoDisc = INHERIT;
|
||||
}
|
||||
|
||||
//! Settings: DML Extended No Disc
|
||||
else if (Settings.DMLConfigVersion > 1 && ret == ++Idx)
|
||||
{
|
||||
if (++GameConfig.DMLNoDisc2 >= MAX_ON_OFF) GameConfig.DMLNoDisc2 = INHERIT;
|
||||
}
|
||||
|
||||
//! Settings: DML Force Widescreen
|
||||
else if (ret == ++Idx)
|
||||
else if (Settings.DMLConfigVersion > 1 && ret == ++Idx)
|
||||
{
|
||||
if (++GameConfig.DMLWidescreen >= MAX_ON_OFF) GameConfig.DMLWidescreen = INHERIT;
|
||||
}
|
||||
|
@ -173,6 +173,7 @@ LoaderSettings::LoaderSettings()
|
||||
Options->SetName(Idx++, "%s", tr( "DML LED Activity" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML PAD Hook" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML No Disc" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML No Disc+" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML Force Widescreen" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DML Debug" ));
|
||||
Options->SetName(Idx++, "%s", tr( "DEVO MemCard Emulation" ));
|
||||
@ -284,6 +285,9 @@ void LoaderSettings::SetOptionValues()
|
||||
//! Settings: DML No Disc
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[Settings.DMLNoDisc]));
|
||||
|
||||
//! Settings: DML Extended No Disc
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[Settings.DMLNoDisc2]));
|
||||
|
||||
//! Settings: DML Force Widescreen
|
||||
Options->SetValue(Idx++, "%s", tr(OnOffText[Settings.DMLWidescreen]));
|
||||
|
||||
@ -477,6 +481,12 @@ int LoaderSettings::GetMenuInternal()
|
||||
if (++Settings.DMLNoDisc >= MAX_ON_OFF) Settings.DMLNoDisc = 0;
|
||||
}
|
||||
|
||||
//! Settings: DML Extended No Disc
|
||||
else if (ret == ++Idx)
|
||||
{
|
||||
if (++Settings.DMLNoDisc2 >= MAX_ON_OFF) Settings.DMLNoDisc2 = 0;
|
||||
}
|
||||
|
||||
//! Settings: DML Force Widescreen
|
||||
else if (ret == ++Idx)
|
||||
{
|
||||
|
@ -82,6 +82,7 @@ int GameBooter::BootGCMode(struct discHdr *gameHdr)
|
||||
u8 dmlActivityLEDChoice = game_cfg->DMLActivityLED == INHERIT ? Settings.DMLActivityLED : game_cfg->DMLActivityLED;
|
||||
u8 dmlPADHookChoice = game_cfg->DMLPADHOOK == INHERIT ? Settings.DMLPADHOOK : game_cfg->DMLPADHOOK;
|
||||
u8 dmlNoDiscChoice = game_cfg->DMLNoDisc == INHERIT ? Settings.DMLNoDisc : game_cfg->DMLNoDisc;
|
||||
u8 dmlNoDisc2Choice = game_cfg->DMLNoDisc2 == INHERIT ? Settings.DMLNoDisc2 : game_cfg->DMLNoDisc2;
|
||||
u8 dmlWidescreenChoice = game_cfg->DMLWidescreen == INHERIT ? Settings.DMLWidescreen : game_cfg->DMLWidescreen;
|
||||
u8 dmlDebugChoice = game_cfg->DMLDebug == INHERIT ? Settings.DMLDebug : game_cfg->DMLDebug;
|
||||
u8 devoMCEmulation = game_cfg->DEVOMCEmulation == INHERIT ? Settings.DEVOMCEmulation : game_cfg->DEVOMCEmulation;
|
||||
@ -289,7 +290,7 @@ int GameBooter::BootGCMode(struct discHdr *gameHdr)
|
||||
WindowPrompt(tr("Warning:"), tr("The Force Widescreen setting requires DIOS MIOS v2.2 or more. This setting will be ignored."), tr("OK"));
|
||||
dmlWidescreenChoice = OFF;
|
||||
}
|
||||
if(dmlNoDiscChoice && dmlConfigVersionChoice < 2) // DML NoDisc setting : removed in DM 1.0, config v1. Used as ForceWidescreen in DM v2.1 with cfg v1. Added back in DM 2.2 update2 Config v2
|
||||
if(dmlNoDiscChoice) // DML NoDisc setting : removed in DM 1.0, config v1. Used as ForceWidescreen in DM v2.1 with cfg v1. Added back in DM 2.2 update2 Config v2
|
||||
{
|
||||
WindowPrompt(tr("Warning:"), tr("The No Disc setting is not used anymore by DIOS MIOS (Lite). Now you need to place a disc in your drive."), tr("OK"));
|
||||
}
|
||||
@ -324,14 +325,12 @@ int GameBooter::BootGCMode(struct discHdr *gameHdr)
|
||||
{
|
||||
dml_config->Config |= DML_CFG_GAME_PATH;
|
||||
strncpy(dml_config->GamePath, gamePath, sizeof(dml_config->GamePath));
|
||||
// use no disc patch
|
||||
if(dmlNoDiscChoice)
|
||||
{
|
||||
if(dmlConfigVersionChoice < 2)
|
||||
dml_config->Config |= DML_CFG_NODISC; // used by v2.1 as ForceWidescreen setting
|
||||
else
|
||||
dml_config->Config |= DML_CFG_NODISC2; // used by v2.2 update2+ as NoDisc setting
|
||||
}
|
||||
// NoDisc patch
|
||||
if(dmlNoDiscChoice && dmlConfigVersionChoice < 2)
|
||||
dml_config->Config |= DML_CFG_NODISC; // used by v2.1 as ForceWidescreen setting
|
||||
// Extended NoDisc patch
|
||||
if(dmlNoDisc2Choice && dmlConfigVersionChoice > 1)
|
||||
dml_config->Config |= DML_CFG_NODISC2; // used by v2.2 update2+ as an Extended NoDisc patching
|
||||
|
||||
gprintf("DML: Loading game %s\n", dml_config->GamePath);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user