mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 13:44:15 +01:00
- fix for being able to select more than 10 categories.
- added prefer_usb option for Wii and GameCube games. when set to yes their partition will be set to USB if USB is connected otherwise set to SD. - possible fix for homebrew and plugin dol launching by moving ShutdownBeforeExit after loading IOS 58.
This commit is contained in:
parent
43cbf1c6be
commit
8ba563cfd6
BIN
out/boot.dol
BIN
out/boot.dol
Binary file not shown.
Before Width: | Height: | Size: 3.6 MiB After Width: | Height: | Size: 3.6 MiB |
@ -182,7 +182,7 @@ int main(int argc, char **argv)
|
||||
|
||||
/* mount USB if needed */
|
||||
DeviceHandle.SetMountUSB(isUsingUSB());
|
||||
DeviceHandle.MountAllUSB();// only mounts any USB if isUsingUSB()
|
||||
bool usb_mounted = DeviceHandle.MountAllUSB();// only mounts any USB if isUsingUSB()
|
||||
|
||||
/* init wait images and show wait animation */
|
||||
m_vid.setCustomWaitImgs(wait_dir, wait_loop);
|
||||
@ -192,7 +192,7 @@ int main(int argc, char **argv)
|
||||
Open_Inputs();// WPAD_SetVRes() is called later in mainMenu.init() during cursor init which gets the theme pointer images
|
||||
|
||||
/* init configs, folders, coverflow, gui and more */
|
||||
if(mainMenu.init())
|
||||
if(mainMenu.init(usb_mounted))
|
||||
{
|
||||
if(CurrentIOS.Version != mainIOS)
|
||||
{
|
||||
|
@ -109,7 +109,7 @@ static void GrabINIFiles(char *FullPath)
|
||||
INI_List.push_back(FullPath);
|
||||
}
|
||||
|
||||
bool CMenu::init()
|
||||
bool CMenu::init(bool usb_mounted)
|
||||
{
|
||||
SoundHandle.Init();
|
||||
m_gameSound.SetVoice(1);
|
||||
@ -182,6 +182,13 @@ bool CMenu::init()
|
||||
if(strncmp(wii_games_dir, "%s:/", 4) != 0)
|
||||
strcpy(wii_games_dir, GAMES_DIR);
|
||||
gprintf("Wii Games Directory: %s\n", wii_games_dir);
|
||||
if(m_cfg.getBool(WII_DOMAIN, "prefer_usb", false))
|
||||
{
|
||||
if(usb_mounted)
|
||||
m_cfg.setInt(WII_DOMAIN, "partition", USB1);
|
||||
else
|
||||
m_cfg.setInt(WII_DOMAIN, "partition", SD);
|
||||
}
|
||||
|
||||
/* GameCube stuff */
|
||||
m_devo_installed = DEVO_Installed(m_dataDir.c_str());
|
||||
@ -193,6 +200,13 @@ bool CMenu::init()
|
||||
gprintf("GameCube Games Directory: %s\n", gc_games_dir);
|
||||
m_gc_play_banner_sound = m_cfg.getBool(GC_DOMAIN, "play_banner_sound", true);
|
||||
m_gc_play_default_sound = m_cfg.getBool(GC_DOMAIN, "play_default_sound", true);
|
||||
if(m_cfg.getBool(GC_DOMAIN, "prefer_usb", false))
|
||||
{
|
||||
if(usb_mounted)
|
||||
m_cfg.setInt(GC_DOMAIN, "partition", USB1);
|
||||
else
|
||||
m_cfg.setInt(GC_DOMAIN, "partition", SD);
|
||||
}
|
||||
|
||||
/* Load cIOS Map */
|
||||
_installed_cios.clear();
|
||||
@ -1977,15 +1991,13 @@ void CMenu::_initCF(void)
|
||||
CoverFlow.clear();
|
||||
CoverFlow.reserve(m_gameList.size());
|
||||
|
||||
char requiredCats[10];
|
||||
char selectedCats[10];
|
||||
char hiddenCats[10];
|
||||
strcpy(requiredCats, m_cat.getString("GENERAL", "required_categories").c_str());
|
||||
strcpy(selectedCats, m_cat.getString("GENERAL", "selected_categories").c_str());
|
||||
strcpy(hiddenCats, m_cat.getString("GENERAL", "hidden_categories").c_str());
|
||||
u8 numReqCats = strlen(requiredCats);
|
||||
u8 numSelCats = strlen(selectedCats);
|
||||
u8 numHidCats = strlen(hiddenCats);
|
||||
string requiredCats = m_cat.getString("GENERAL", "required_categories", "");
|
||||
string selectedCats = m_cat.getString("GENERAL", "selected_categories", "");
|
||||
string hiddenCats = m_cat.getString("GENERAL", "hidden_categories", "");
|
||||
u8 numReqCats = requiredCats.length();
|
||||
u8 numSelCats = selectedCats.length();
|
||||
u8 numHidCats = hiddenCats.length();
|
||||
|
||||
char id[74];
|
||||
char catID[64];
|
||||
|
||||
@ -2050,9 +2062,8 @@ void CMenu::_initCF(void)
|
||||
|
||||
if(numReqCats != 0 || numSelCats != 0 || numHidCats != 0) // if all 0 skip checking cats and show all games
|
||||
{
|
||||
char idCats[10];
|
||||
strcpy(idCats, m_cat.getString(catDomain, catID).c_str());
|
||||
u8 numIdCats = strlen(idCats);
|
||||
string idCats= m_cat.getString(catDomain, catID, "");
|
||||
u8 numIdCats = idCats.length();
|
||||
if(numIdCats == 0)
|
||||
m_cat.remove(catDomain, catID);
|
||||
bool inaCat = false;
|
||||
|
@ -38,7 +38,7 @@ class CMenu
|
||||
{
|
||||
public:
|
||||
CMenu();
|
||||
bool init();
|
||||
bool init(bool usb_mounted);
|
||||
void error(const wstringEx &msg);
|
||||
void terror(const char *key, const wchar_t *msg) { error(_fmt(key, msg)); }
|
||||
int main(void);
|
||||
|
@ -189,15 +189,12 @@ void CMenu::_CategorySettings(bool fromGameSet)
|
||||
}
|
||||
else
|
||||
{
|
||||
char requiredCats[10];
|
||||
char selectedCats[10];
|
||||
char hiddenCats[10];
|
||||
strcpy(requiredCats, m_cat.getString("GENERAL", "required_categories").c_str());
|
||||
strcpy(selectedCats, m_cat.getString("GENERAL", "selected_categories").c_str());
|
||||
strcpy(hiddenCats, m_cat.getString("GENERAL", "hidden_categories").c_str());
|
||||
u8 numReqCats = strlen(requiredCats);
|
||||
u8 numSelCats = strlen(selectedCats);
|
||||
u8 numHidCats = strlen(hiddenCats);
|
||||
string requiredCats = m_cat.getString("GENERAL", "required_categories", "");
|
||||
string selectedCats = m_cat.getString("GENERAL", "selected_categories", "");
|
||||
string hiddenCats = m_cat.getString("GENERAL", "hidden_categories", "");
|
||||
u8 numReqCats = requiredCats.length();
|
||||
u8 numSelCats = selectedCats.length();
|
||||
u8 numHidCats = hiddenCats.length();
|
||||
|
||||
if(numReqCats != 0)
|
||||
{
|
||||
|
@ -212,8 +212,8 @@ void CMenu::_launchHomebrew(const char *filepath, vector<string> arguments)
|
||||
AddBootArgument(arguments[i].c_str());
|
||||
}
|
||||
|
||||
ShutdownBeforeExit();// wifi and sd gecko doesnt work anymore after
|
||||
loadIOS(58, false);
|
||||
ShutdownBeforeExit();// wifi and sd gecko doesnt work anymore after
|
||||
BootHomebrew();
|
||||
Sys_Exit();
|
||||
}
|
||||
@ -519,9 +519,10 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
}
|
||||
|
||||
Nintendont_SetOptions(path, id, CheatPath, GClanguage, n_config, n_videomode, vidscale, vidoffset);
|
||||
ShutdownBeforeExit();
|
||||
|
||||
loadIOS(58, false); //nintendont NEEDS ios58 and AHBPROT disabled
|
||||
/* should be a check for error loading IOS58 and AHBPROT disabled */
|
||||
ShutdownBeforeExit();
|
||||
BootHomebrew(); //regular dol
|
||||
}
|
||||
else // loader == DEVOLUTION
|
||||
|
@ -1 +1 @@
|
||||
<pd><ViewState><e p="Wiiflow\portlibs" x="false"></e><e p="Wiiflow\source\cheats" x="false"></e><e p="Wiiflow\docs" x="false"></e><e p="Wiiflow\source\fileOps" x="false"></e><e p="Wiiflow\source\gecko" x="false"></e><e p="Wiiflow\source\homebrew" x="false"></e><e p="Wiiflow\source\loader" x="false"></e><e p="Wiiflow\source\libwolfssl" x="false"></e><e p="Wiiflow\source\wstringEx" x="false"></e><e p="Wiiflow\source\gc" x="false"></e><e p="Wiiflow\source\list" x="true"></e><e p="Wiiflow\source\music" x="false"></e><e p="Wiiflow\source\banner" x="false"></e><e p="Wiiflow\source\config" x="true"></e><e p="Wiiflow\source\libwbfs" x="false"></e><e p="Wiiflow\source\memory" x="false"></e><e p="Wiiflow\source\sicksaxis-wrapper" x="false"></e><e p="Wiiflow\source" x="true"></e><e p="Wiiflow\source\channel" x="false"></e><e p="Wiiflow\source\hw" x="false"></e><e p="Wiiflow\source\menu" x="true"></e><e p="Wiiflow\source\network" x="false"></e><e p="Wiiflow\source\plugin" x="true"></e><e p="Wiiflow\source\unzip" x="false"></e><e p="Wiiflow\wii" x="false"></e><e p="Wiiflow\data" x="false"></e><e p="Wiiflow\resources" x="false"></e><e p="Wiiflow\scripts" x="false"></e><e p="Wiiflow\source\booter" x="false"></e><e p="Wiiflow\source\devicemounter" x="false"></e><e p="Wiiflow\source\gui" x="false"></e><e p="Wiiflow" x="true"></e></ViewState></pd>
|
||||
<pd><ViewState><e p="Wiiflow\portlibs" x="false"></e><e p="Wiiflow\source\cheats" x="false"></e><e p="Wiiflow\docs" x="false"></e><e p="Wiiflow\source\fileOps" x="false"></e><e p="Wiiflow\source\gecko" x="false"></e><e p="Wiiflow\source\homebrew" x="false"></e><e p="Wiiflow\source\loader" x="false"></e><e p="Wiiflow\source\libwolfssl" x="false"></e><e p="Wiiflow\source\wstringEx" x="false"></e><e p="Wiiflow\source\gc" x="false"></e><e p="Wiiflow\source\list" x="false"></e><e p="Wiiflow\source\music" x="false"></e><e p="Wiiflow\source\banner" x="false"></e><e p="Wiiflow\source\config" x="false"></e><e p="Wiiflow\source\libwbfs" x="false"></e><e p="Wiiflow\source\memory" x="false"></e><e p="Wiiflow\source\sicksaxis-wrapper" x="false"></e><e p="Wiiflow\source" x="true"></e><e p="Wiiflow\source\channel" x="false"></e><e p="Wiiflow\source\hw" x="false"></e><e p="Wiiflow\source\menu" x="true"></e><e p="Wiiflow\source\network" x="false"></e><e p="Wiiflow\source\plugin" x="false"></e><e p="Wiiflow\source\unzip" x="false"></e><e p="Wiiflow\wii" x="false"></e><e p="Wiiflow\data" x="false"></e><e p="Wiiflow\resources" x="false"></e><e p="Wiiflow\scripts" x="false"></e><e p="Wiiflow\source\booter" x="false"></e><e p="Wiiflow\source\devicemounter" x="false"></e><e p="Wiiflow\source\gui" x="false"></e><e p="Wiiflow" x="true"></e></ViewState></pd>
|
Loading…
Reference in New Issue
Block a user