-fixed some minor issues with pressing B for source menu/flow.

-fixed some minor issues with showing homebrew flow and exiting back to sourceflow or previous flow.
This commit is contained in:
Fledge68 2018-10-03 12:51:57 -05:00
parent af509ace56
commit d8964cf185
4 changed files with 35 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.3 MiB

View File

@ -226,12 +226,13 @@ int CMenu::main(void)
bool show_gamecube = !m_cfg.getBool(GC_DOMAIN, "disable", false); bool show_gamecube = !m_cfg.getBool(GC_DOMAIN, "disable", false);
m_multisource = m_cfg.getBool("GENERAL", "multisource", false); m_multisource = m_cfg.getBool("GENERAL", "multisource", false);
bool m_source_on_start = m_cfg.getBool("GENERAL", "source_on_start", false); bool m_source_on_start = m_cfg.getBool("GENERAL", "source_on_start", false);
bool bheld = false; bool bheld = false;// bheld to indicate btn b was pressed or held
bool bUsed = false; bool bUsed = false;// bused to indicate that it was actually used for something
m_emuSaveNand = false; m_emuSaveNand = false;
m_reload = false; m_reload = false;
u32 disc_check = 0; u32 disc_check = 0;
m_prev_view = 0;
m_current_view = m_cfg.getUInt("GENERAL", "sources", COVERFLOW_WII); m_current_view = m_cfg.getUInt("GENERAL", "sources", COVERFLOW_WII);
m_source_cnt = 0; m_source_cnt = 0;
for(u8 i = 1; i < 16; i <<= 1)//not including coverflow_homebrew for(u8 i = 1; i < 16; i <<= 1)//not including coverflow_homebrew
@ -290,9 +291,10 @@ int CMenu::main(void)
_showCF(true); _showCF(true);
continue; continue;
} }
if(m_current_view == COVERFLOW_HOMEBREW) if(m_current_view == COVERFLOW_HOMEBREW && m_prev_view != 0)
{ {
m_current_view = m_prev_view; m_current_view = m_prev_view;
m_prev_view = 0;
m_cfg.setUInt("GENERAL", "sources", m_current_view); m_cfg.setUInt("GENERAL", "sources", m_current_view);
_showCF(true); _showCF(true);
continue; continue;
@ -372,7 +374,10 @@ int CMenu::main(void)
if(_Home()) if(_Home())
break;// exit wiiflow break;// exit wiiflow
if(BTN_B_HELD) if(BTN_B_HELD)
{
bheld = true;
bUsed = true; bUsed = true;
}
_showMain(); _showMain();
} }
else if(m_btnMgr.selected(m_mainBtnChannel) || m_btnMgr.selected(m_mainBtnWii) || m_btnMgr.selected(m_mainBtnGamecube) || m_btnMgr.selected(m_mainBtnPlugin)) else if(m_btnMgr.selected(m_mainBtnChannel) || m_btnMgr.selected(m_mainBtnWii) || m_btnMgr.selected(m_mainBtnGamecube) || m_btnMgr.selected(m_mainBtnPlugin))
@ -403,7 +408,10 @@ int CMenu::main(void)
break; break;
} }
if(BTN_B_HELD) if(BTN_B_HELD)
{
bheld = true;
bUsed = true; bUsed = true;
}
_showMain(); _showMain();
} }
else if(m_btnMgr.selected(m_mainBtnHomebrew)) else if(m_btnMgr.selected(m_mainBtnHomebrew))
@ -412,6 +420,11 @@ int CMenu::main(void)
if(m_locked && m_cfg.getBool(HOMEBREW_DOMAIN, "parental", false)) if(m_locked && m_cfg.getBool(HOMEBREW_DOMAIN, "parental", false))
{ {
error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature.")); error(_t("errgame15", L"WiiFlow locked! Unlock WiiFlow to use this feature."));
if(BTN_B_HELD)
{
bheld = true;
bUsed = true;
}
_showMain(); _showMain();
} }
else else
@ -420,8 +433,6 @@ int CMenu::main(void)
m_current_view = COVERFLOW_HOMEBREW; m_current_view = COVERFLOW_HOMEBREW;
_showCF(true); _showCF(true);
} }
if(BTN_B_HELD)
bUsed = true;
} }
else if(m_btnMgr.selected(m_mainBtnDVD)) else if(m_btnMgr.selected(m_mainBtnDVD))
{ {
@ -434,7 +445,10 @@ int CMenu::main(void)
/* Boot the Disc */ /* Boot the Disc */
_launchGame(&hdr, true, BTN_B_HELD); _launchGame(&hdr, true, BTN_B_HELD);
if(BTN_B_HELD) if(BTN_B_HELD)
{
bheld = true;
bUsed = true; bUsed = true;
}
_showCF(false); _showCF(false);
} }
else if(m_btnMgr.selected(m_mainBtnFavoritesOn) || m_btnMgr.selected(m_mainBtnFavoritesOff)) else if(m_btnMgr.selected(m_mainBtnFavoritesOn) || m_btnMgr.selected(m_mainBtnFavoritesOff))
@ -460,7 +474,10 @@ int CMenu::main(void)
if(m_exit) if(m_exit)
break; break;
if(BTN_B_HELD) if(BTN_B_HELD)
{
bheld = true;
bUsed = true; bUsed = true;
}
if(m_refreshGameList) if(m_refreshGameList)
{ {
/* if changes were made to favorites, parental lock, or categories */ /* if changes were made to favorites, parental lock, or categories */
@ -474,13 +491,19 @@ int CMenu::main(void)
} }
else if(BTN_B_PRESSED) else if(BTN_B_PRESSED)
{ {
bheld = true;
/* Show Categories */ /* Show Categories */
if(m_btnMgr.selected(m_mainBtnFavoritesOn) || m_btnMgr.selected(m_mainBtnFavoritesOff)) if(m_btnMgr.selected(m_mainBtnFavoritesOn) || m_btnMgr.selected(m_mainBtnFavoritesOff))
{ {
_hideMain(); _hideMain();
_CategorySettings(); _CategorySettings();
if(BTN_B_HELD) if(BTN_B_HELD)// returned using the b btn
{
bheld = true;
bUsed = true; bUsed = true;
}
else
bheld = false;
_setBg(m_mainBg, m_mainBgLQ); _setBg(m_mainBg, m_mainBgLQ);
if(m_refreshGameList) if(m_refreshGameList)
{ {
@ -521,12 +544,10 @@ int CMenu::main(void)
else if(WROLL_LEFT) else if(WROLL_LEFT)
{ {
CoverFlow.left(); CoverFlow.left();
bUsed = true;
} }
else if(WROLL_RIGHT) else if(WROLL_RIGHT)
{ {
CoverFlow.right(); CoverFlow.right();
bUsed = true;
} }
if(!BTN_B_HELD) if(!BTN_B_HELD)
{ {
@ -654,7 +675,12 @@ int CMenu::main(void)
if(m_exit) if(m_exit)
break; break;
if(BTN_B_HELD) if(BTN_B_HELD)
{
bheld = true;
bUsed = true; bUsed = true;
}
else
bheld = false;
if(m_refreshGameList) if(m_refreshGameList)
{ {
/* if changes were made to favorites, parental lock, or categories */ /* if changes were made to favorites, parental lock, or categories */

View File

@ -151,6 +151,7 @@ void CMenu::_partitionsCfg(void)
} }
} }
m_current_view = m_prev_view; m_current_view = m_prev_view;
m_prev_view = 0;
currentPartition = prevPartition; currentPartition = prevPartition;
_hidePartitionsCfg(); _hidePartitionsCfg();
} }

View File

@ -42,7 +42,6 @@ void CMenu::_sourceFlow()
memset(btn_selected, 0, 16); memset(btn_selected, 0, 16);
strncpy(btn_selected, fmt("BUTTON_%i", hdr->settings[0]), 15); strncpy(btn_selected, fmt("BUTTON_%i", hdr->settings[0]), 15);
source = m_source.getString(btn_selected, "source", ""); source = m_source.getString(btn_selected, "source", "");
cf_domain = "_COVERFLOW";
if(source == "dml") if(source == "dml")
m_current_view = COVERFLOW_GAMECUBE; m_current_view = COVERFLOW_GAMECUBE;
@ -64,8 +63,6 @@ void CMenu::_sourceFlow()
else else
{ {
m_current_view = COVERFLOW_HOMEBREW; m_current_view = COVERFLOW_HOMEBREW;
if(m_cfg.getBool(HOMEBREW_DOMAIN, "smallbox", true))
cf_domain = "_SMALLFLOW";
} }
} }
else if(source == "allplugins") else if(source == "allplugins")
@ -313,7 +310,6 @@ bool CMenu::_Source()
if((BTN_A_PRESSED && m_btnMgr.selected(m_sourceBtnBack)) || BTN_B_PRESSED) if((BTN_A_PRESSED && m_btnMgr.selected(m_sourceBtnBack)) || BTN_B_PRESSED)
{ {
if(!m_multisource) break; if(!m_multisource) break;
cf_domain = "_COVERFLOW";
if(selectedBtns == 0) if(selectedBtns == 0)
{ {
m_current_view = COVERFLOW_WII; m_current_view = COVERFLOW_WII;
@ -417,7 +413,6 @@ bool CMenu::_Source()
} }
else else
{ {
m_prev_view = m_current_view;
m_current_view = COVERFLOW_HOMEBREW; m_current_view = COVERFLOW_HOMEBREW;
_setSrcOptions(); _setSrcOptions();
} }