- CHANNNEL_DOMAIN disable is now CHANNEL_DOMAIN emu_nand (=yes or no) because that's what it's used for.

- GENERAL hidechannels is now CHANNEL_DOMAIN disable because that's what it is for all the other domains. makes sense to me. :P
- GAMECUBE_DOMAIN always_show_button is now GAMECUBE_DOMAIN disable to match all the other domains.
- so now 'disable' for each domain means show or don't show that view except wii of course.
This commit is contained in:
fledge68 2016-04-05 22:42:32 +00:00
parent 9bdc84de6c
commit a66723807e
8 changed files with 30 additions and 30 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 MiB

After

Width:  |  Height:  |  Size: 3.1 MiB

View File

@ -219,16 +219,16 @@ void CMenu::init()
/* GameCube stuff */ /* GameCube stuff */
m_devo_installed = DEVO_Installed(m_dataDir.c_str()); m_devo_installed = DEVO_Installed(m_dataDir.c_str());
m_nintendont_installed = Nintendont_Installed(); m_nintendont_installed = Nintendont_Installed();
m_show_gc = m_cfg.getBool(GC_DOMAIN, "always_show_button", false); m_show_gc = !m_cfg.getBool(GC_DOMAIN, "disable", true);
memset(gc_games_dir, 0, 64); memset(gc_games_dir, 0, 64);
strncpy(gc_games_dir, m_cfg.getString(GC_DOMAIN, "gc_games_dir", DF_GC_GAMES_DIR).c_str(), 64); strncpy(gc_games_dir, m_cfg.getString(GC_DOMAIN, "gc_games_dir", DF_GC_GAMES_DIR).c_str(), 64);
if(strncmp(gc_games_dir, "%s:/", 4) != 0) if(strncmp(gc_games_dir, "%s:/", 4) != 0)
strcpy(gc_games_dir, DF_GC_GAMES_DIR); strcpy(gc_games_dir, DF_GC_GAMES_DIR);
gprintf("GameCube Games Directory: %s\n", gc_games_dir); gprintf("GameCube Games Directory: %s\n", gc_games_dir);
/* Emu NAND */ /* Create CHANNEL keys and set default values if key didn't exist */
m_cfg.getString(CHANNEL_DOMAIN, "path", ""); m_cfg.getString(CHANNEL_DOMAIN, "path", "");
m_cfg.getInt(CHANNEL_DOMAIN, "partition", 1); m_cfg.getInt(CHANNEL_DOMAIN, "partition", 1);
m_cfg.getBool(CHANNEL_DOMAIN, "disable", true);//emu_nand m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand", false);//emu_nand
/* Load cIOS Map */ /* Load cIOS Map */
_installed_cios.clear(); _installed_cios.clear();
if(!neek2o() && !Sys_DolphinMode()) if(!neek2o() && !Sys_DolphinMode())
@ -2101,10 +2101,10 @@ const wstringEx CMenu::_fmt(const char *key, const wchar_t *def)
bool CMenu::_loadChannelList(void) bool CMenu::_loadChannelList(void)
{ {
m_gameList.clear(); m_gameList.clear();
string emuPath; string emuPath;// set via _FindEmuPart and used throughout wiiflow code
string cacheDir; string cacheDir;//real nand empty
int emuPartition = -1; int emuPartition = -1; //real nand value
NANDemuView = (!neek2o() && m_cfg.getBool(CHANNEL_DOMAIN, "disable", true) == false); NANDemuView = (neek2o() || m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand", false));
if(NANDemuView) if(NANDemuView)
{ {
emuPartition = _FindEmuPart(emuPath, false); emuPartition = _FindEmuPart(emuPath, false);
@ -2120,7 +2120,8 @@ bool CMenu::_loadChannelList(void)
currentPartition = emuPartition; currentPartition = emuPartition;
cacheDir = fmt("%s/%s_channels.db", m_listCacheDir.c_str(), DeviceName[currentPartition]); cacheDir = fmt("%s/%s_channels.db", m_listCacheDir.c_str(), DeviceName[currentPartition]);
} }
bool updateCache = m_cfg.getBool(CHANNEL_DOMAIN, "update_cache"); bool updateCache = m_cfg.getBool(CHANNEL_DOMAIN, "update_cache");//real nand doesn't update
/* CreateList checks if cacheDir is empty if so then doesn't update/create cache .db file */
vector<string> NullVector; vector<string> NullVector;
m_gameList.CreateList(COVERFLOW_CHANNEL, currentPartition, std::string(), m_gameList.CreateList(COVERFLOW_CHANNEL, currentPartition, std::string(),
NullVector, cacheDir, updateCache); NullVector, cacheDir, updateCache);

View File

@ -50,7 +50,7 @@ void CMenu::_showConfig(void)
{ {
_showConfigCommon(m_configBg, g_curPage); _showConfigCommon(m_configBg, g_curPage);
if (!m_locked) if(!m_locked)
{ {
m_btnMgr.show(m_configLblPartitionName); m_btnMgr.show(m_configLblPartitionName);
m_btnMgr.show(m_configLblPartition); m_btnMgr.show(m_configLblPartition);
@ -59,13 +59,12 @@ void CMenu::_showConfig(void)
m_btnMgr.show(m_configLblDownload); m_btnMgr.show(m_configLblDownload);
m_btnMgr.show(m_configBtnDownload); m_btnMgr.show(m_configBtnDownload);
bool disable = (m_current_view == COVERFLOW_CHANNEL) && (m_cfg.getBool(CHANNEL_DOMAIN, "disable", true) || neek2o()) && !m_emuSaveNand;
const char *partitionname = disable ? CHANNEL_DOMAIN : DeviceName[m_emuSaveNand ? m_cfg.getInt(WII_DOMAIN, "savepartition", 0) : m_cfg.getInt(_domainFromView(), "partition", 0)];
for(u8 i = 0; i < ARRAY_SIZE(m_configLblUser); ++i) for(u8 i = 0; i < ARRAY_SIZE(m_configLblUser); ++i)
if(m_configLblUser[i] != -1) if(m_configLblUser[i] != -1)
m_btnMgr.show(m_configLblUser[i]); m_btnMgr.show(m_configLblUser[i]);
bool disable = (m_current_view == COVERFLOW_CHANNEL) && (!m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand", false) || neek2o()) && !m_emuSaveNand;
const char *partitionname = disable ? CHANNEL_DOMAIN : DeviceName[m_emuSaveNand ? m_cfg.getInt(WII_DOMAIN, "savepartition", 0) : m_cfg.getInt(_domainFromView(), "partition", 0)];
m_btnMgr.setText(m_configLblPartition, upperCase(partitionname)); m_btnMgr.setText(m_configLblPartition, upperCase(partitionname));
m_btnMgr.show(m_configLblCfg4); m_btnMgr.show(m_configLblCfg4);

View File

@ -704,7 +704,7 @@ void CMenu::_game(bool launch)
m_btnMgr.show(m_gameBtnSettings); m_btnMgr.show(m_gameBtnSettings);
} }
if((CoverFlow.getHdr()->type != TYPE_HOMEBREW && (CoverFlow.getHdr()->type != TYPE_CHANNEL || if((CoverFlow.getHdr()->type != TYPE_HOMEBREW && (CoverFlow.getHdr()->type != TYPE_CHANNEL ||
(!m_cfg.getBool(CHANNEL_DOMAIN, "disable", true) && CoverFlow.getHdr()->type == TYPE_CHANNEL))) && !m_locked) (m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand", false) && CoverFlow.getHdr()->type == TYPE_CHANNEL))) && !m_locked)
m_btnMgr.show(m_gameBtnDelete); m_btnMgr.show(m_gameBtnDelete);
} }
else else
@ -1101,7 +1101,7 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
_launchShutdown(); _launchShutdown();
string id = string(hdr->id); string id = string(hdr->id);
bool NAND_Emu = !m_cfg.getBool(CHANNEL_DOMAIN, "disable", true); bool NAND_Emu = m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand", false);
bool WII_Launch = (m_gcfg2.getBool(id, "custom", false) && (!NAND_Emu || neek2o())); bool WII_Launch = (m_gcfg2.getBool(id, "custom", false) && (!NAND_Emu || neek2o()));
bool use_dol = !m_gcfg2.getBool(id, "apploader", false); bool use_dol = !m_gcfg2.getBool(id, "apploader", false);

View File

@ -225,7 +225,7 @@ void CMenu::LoadView(void)
if(m_sourceflow) if(m_sourceflow)
return; return;
const char *mode = (m_current_view == COVERFLOW_CHANNEL && m_cfg.getBool(CHANNEL_DOMAIN, "disable", true)) const char *mode = (m_current_view == COVERFLOW_CHANNEL && !m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand", false))
? CHANNEL_DOMAIN : DeviceName[currentPartition]; ? CHANNEL_DOMAIN : DeviceName[currentPartition];
m_showtimer = 120; m_showtimer = 120;
@ -254,7 +254,7 @@ int CMenu::main(void)
string prevTheme = m_cfg.getString("GENERAL", "theme", "default"); string prevTheme = m_cfg.getString("GENERAL", "theme", "default");
parental_homebrew = m_cfg.getBool(HOMEBREW_DOMAIN, "parental", false); parental_homebrew = m_cfg.getBool(HOMEBREW_DOMAIN, "parental", false);
show_homebrew = (!m_cfg.getBool(HOMEBREW_DOMAIN, "disable", false) && (parental_homebrew || !m_locked)); show_homebrew = (!m_cfg.getBool(HOMEBREW_DOMAIN, "disable", false) && (parental_homebrew || !m_locked));
show_channel = !m_cfg.getBool("GENERAL", "hidechannel", false); show_channel = !m_cfg.getBool(CHANNEL_DOMAIN, "disable", false);
show_plugin = !m_cfg.getBool(PLUGIN_DOMAIN, "disable", false); show_plugin = !m_cfg.getBool(PLUGIN_DOMAIN, "disable", false);
show_gamecube = m_show_gc; show_gamecube = m_show_gc;
m_allow_random = m_cfg.getBool("GENERAL", "allow_b_on_questionmark", true); m_allow_random = m_cfg.getBool("GENERAL", "allow_b_on_questionmark", true);
@ -684,7 +684,7 @@ int CMenu::main(void)
_showWaitMessage(); _showWaitMessage();
_hideMain(); _hideMain();
_setPartition(1); _setPartition(1);
if(m_current_view == COVERFLOW_CHANNEL && (m_cfg.getBool(CHANNEL_DOMAIN, "disable", true) || neek2o())) if(m_current_view == COVERFLOW_CHANNEL && (!m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand", false) || neek2o()))
partition = "NAND"; partition = "NAND";
else else
partition = DeviceName[currentPartition]; partition = DeviceName[currentPartition];
@ -1097,7 +1097,7 @@ void CMenu::_setPartition(s8 direction)
if(m_current_view == COVERFLOW_CHANNEL && !NANDemuView) if(m_current_view == COVERFLOW_CHANNEL && !NANDemuView)
{ {
NANDemuView = true; NANDemuView = true;
m_cfg.setBool(CHANNEL_DOMAIN, "disable", false); m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", true);
switch_to_real = false; switch_to_real = false;
} }
bool NeedFAT = m_current_view == COVERFLOW_CHANNEL || m_current_view == COVERFLOW_GAMECUBE; bool NeedFAT = m_current_view == COVERFLOW_CHANNEL || m_current_view == COVERFLOW_GAMECUBE;
@ -1118,7 +1118,7 @@ void CMenu::_setPartition(s8 direction)
if(m_current_view == COVERFLOW_CHANNEL && FS_Type == -1) if(m_current_view == COVERFLOW_CHANNEL && FS_Type == -1)
{ {
NANDemuView = false; NANDemuView = false;
m_cfg.setBool(CHANNEL_DOMAIN, "disable", true); m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", false);
} }
} }
if(m_emuSaveNand) if(m_emuSaveNand)

View File

@ -241,7 +241,7 @@ void CMenu::_showNandEmu(void)
if(nandemuPage == 1) if(nandemuPage == 1)
{ {
int i; int i;
if(((m_current_view == COVERFLOW_CHANNEL && !m_cfg.getBool(CHANNEL_DOMAIN, "disable", true)) || m_current_view == COVERFLOW_WII)) if(((m_current_view == COVERFLOW_CHANNEL && m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand", false)) || m_current_view == COVERFLOW_WII))
{ {
m_btnMgr.show(m_nandemuLblEmulation); m_btnMgr.show(m_nandemuLblEmulation);
m_btnMgr.show(m_nandemuLblEmulationVal); m_btnMgr.show(m_nandemuLblEmulationVal);

View File

@ -126,13 +126,13 @@ void CMenu::_updateSourceBtns(void)
else if(btnSource == "realnand" || btnSource == "emunand") else if(btnSource == "realnand" || btnSource == "emunand")
{ {
ImgName = m_source.getString(fmt("BUTTON_%i", i),"image", "").c_str(); ImgName = m_source.getString(fmt("BUTTON_%i", i),"image", "").c_str();
if(m_cfg.getBool(CHANNEL_DOMAIN, "source", false) && m_cfg.getBool(CHANNEL_DOMAIN, "disable") && btnSource == "realnand") if(m_cfg.getBool(CHANNEL_DOMAIN, "source", false) && !m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand") && btnSource == "realnand")
{ {
sourceBtn = i; sourceBtn = i;
selectedBtns++; selectedBtns++;
ImgName = m_source.getString(fmt("BUTTON_%i", i),"image_s", "").c_str(); ImgName = m_source.getString(fmt("BUTTON_%i", i),"image_s", "").c_str();
} }
else if(m_cfg.getBool(CHANNEL_DOMAIN, "source", false) && !m_cfg.getBool(CHANNEL_DOMAIN, "disable") && btnSource == "emunand") else if(m_cfg.getBool(CHANNEL_DOMAIN, "source", false) && m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand") && btnSource == "emunand")
{ {
sourceBtn = i; sourceBtn = i;
selectedBtns++; selectedBtns++;
@ -217,14 +217,14 @@ void CMenu::_sourceFlow()
else if(source == "emunand") else if(source == "emunand")
{ {
m_current_view = COVERFLOW_CHANNEL; m_current_view = COVERFLOW_CHANNEL;
m_cfg.setBool(CHANNEL_DOMAIN, "disable", false); m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", true);
m_cfg.setBool(CHANNEL_DOMAIN, "source", true); m_cfg.setBool(CHANNEL_DOMAIN, "source", true);
m_catStartPage = m_source.getInt(btn_selected, "cat_page", 1); m_catStartPage = m_source.getInt(btn_selected, "cat_page", 1);
} }
else if(source == "realnand") else if(source == "realnand")
{ {
m_current_view = COVERFLOW_CHANNEL; m_current_view = COVERFLOW_CHANNEL;
m_cfg.setBool(CHANNEL_DOMAIN, "disable", true); m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", false);
m_cfg.setBool(CHANNEL_DOMAIN, "source", true); m_cfg.setBool(CHANNEL_DOMAIN, "source", true);
m_catStartPage = m_source.getInt(btn_selected, "cat_page", 1); m_catStartPage = m_source.getInt(btn_selected, "cat_page", 1);
} }
@ -323,7 +323,7 @@ bool CMenu::_Source()
CoverFlow.clear(); CoverFlow.clear();
u8 i, j, k; u8 i, j, k;
bool show_homebrew = !m_cfg.getBool(HOMEBREW_DOMAIN, "disable", false); bool show_homebrew = !m_cfg.getBool(HOMEBREW_DOMAIN, "disable", false);
bool show_channel = !m_cfg.getBool("GENERAL", "hidechannel", false); bool show_channel = !m_cfg.getBool(CHANNEL_DOMAIN, "disable", false);
bool show_emu = !m_cfg.getBool(PLUGIN_DOMAIN, "disable", false); bool show_emu = !m_cfg.getBool(PLUGIN_DOMAIN, "disable", false);
bool parental_homebrew = m_cfg.getBool(HOMEBREW_DOMAIN, "parental", false); bool parental_homebrew = m_cfg.getBool(HOMEBREW_DOMAIN, "parental", false);
bool noChanges = true; bool noChanges = true;
@ -531,7 +531,7 @@ bool CMenu::_Source()
_showSourceNotice(); _showSourceNotice();
else else
{ {
m_cfg.setBool(CHANNEL_DOMAIN, "disable", false); m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", true);
m_cfg.setBool(CHANNEL_DOMAIN, "source", true); m_cfg.setBool(CHANNEL_DOMAIN, "source", true);
m_catStartPage = m_source.getInt(btn_selected, "cat_page", 1); m_catStartPage = m_source.getInt(btn_selected, "cat_page", 1);
} }
@ -542,7 +542,7 @@ bool CMenu::_Source()
_showSourceNotice(); _showSourceNotice();
else else
{ {
m_cfg.setBool(CHANNEL_DOMAIN, "disable", true); m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", false);
m_cfg.setBool(CHANNEL_DOMAIN, "source", true); m_cfg.setBool(CHANNEL_DOMAIN, "source", true);
m_catStartPage = m_source.getInt(btn_selected, "cat_page", 1); m_catStartPage = m_source.getInt(btn_selected, "cat_page", 1);
} }
@ -665,7 +665,7 @@ bool CMenu::_Source()
{ {
if(show_channel) if(show_channel)
{ {
m_cfg.setBool(CHANNEL_DOMAIN, "disable", false); m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", true);
m_cfg.setBool(CHANNEL_DOMAIN, "source", !m_cfg.getBool(CHANNEL_DOMAIN, "source")); m_cfg.setBool(CHANNEL_DOMAIN, "source", !m_cfg.getBool(CHANNEL_DOMAIN, "source"));
} }
} }
@ -673,7 +673,7 @@ bool CMenu::_Source()
{ {
if(show_channel) if(show_channel)
{ {
m_cfg.setBool(CHANNEL_DOMAIN, "disable", true); m_cfg.setBool(CHANNEL_DOMAIN, "emu_nand", false);
m_cfg.setBool(CHANNEL_DOMAIN, "source", !m_cfg.getBool(CHANNEL_DOMAIN, "source")); m_cfg.setBool(CHANNEL_DOMAIN, "source", !m_cfg.getBool(CHANNEL_DOMAIN, "source"));
} }
} }

View File

@ -416,7 +416,7 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
WBFS_Close(); WBFS_Close();
upd_wii = true; upd_wii = true;
} }
else if(CF_Hdr->type == TYPE_CHANNEL && !m_cfg.getBool(CHANNEL_DOMAIN, "disable", true)) else if(CF_Hdr->type == TYPE_CHANNEL && m_cfg.getBool(CHANNEL_DOMAIN, "emu_nand", false))
{ {
if(CF_Hdr->settings[0] != 0x00010001) if(CF_Hdr->settings[0] != 0x00010001)
{ {