mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2025-01-26 18:45:28 +01:00
- Finally fixed 'b' to source menu the correct way. now just press 'b' and release. Thanks Maxternal. No need to hold it or point at anything. But don't worry b on mode and home buttons are still there but there's really no need for them now.
This commit is contained in:
parent
3c4bdd228e
commit
a31fb36a37
@ -264,6 +264,7 @@ int CMenu::main(void)
|
|||||||
bool b_lr_mode = m_cfg.getBool("GENERAL", "b_lr_mode", false);
|
bool b_lr_mode = m_cfg.getBool("GENERAL", "b_lr_mode", false);
|
||||||
bool use_grab = m_cfg.getBool("GENERAL", "use_grab", false);
|
bool use_grab = m_cfg.getBool("GENERAL", "use_grab", false);
|
||||||
bool bheld = false;
|
bool bheld = false;
|
||||||
|
bool bUsed = false;
|
||||||
|
|
||||||
m_reload = false;
|
m_reload = false;
|
||||||
static u32 disc_check = 0;
|
static u32 disc_check = 0;
|
||||||
@ -299,6 +300,8 @@ int CMenu::main(void)
|
|||||||
LoadView();
|
LoadView();
|
||||||
else
|
else
|
||||||
_showMain();
|
_showMain();
|
||||||
|
if(BTN_B_HELD)
|
||||||
|
bUsed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
lwp_t coverStatus = LWP_THREAD_NULL;
|
lwp_t coverStatus = LWP_THREAD_NULL;
|
||||||
@ -306,8 +309,6 @@ int CMenu::main(void)
|
|||||||
SmartBuf coverstatus_stack = smartMem2Alloc(stack_size);
|
SmartBuf coverstatus_stack = smartMem2Alloc(stack_size);
|
||||||
LWP_CreateThread(&coverStatus, (void *(*)(void *))CMenu::GetCoverStatusAsync, (void *)this, coverstatus_stack.get(), stack_size, 40);
|
LWP_CreateThread(&coverStatus, (void *(*)(void *))CMenu::GetCoverStatusAsync, (void *)this, coverstatus_stack.get(), stack_size, 40);
|
||||||
|
|
||||||
time_t SourceMenuTimeout = 0;
|
|
||||||
|
|
||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
_mainLoopCommon(true);
|
_mainLoopCommon(true);
|
||||||
@ -322,7 +323,21 @@ int CMenu::main(void)
|
|||||||
if(bheld && !BTN_B_HELD)
|
if(bheld && !BTN_B_HELD)
|
||||||
{
|
{
|
||||||
bheld = false;
|
bheld = false;
|
||||||
SourceMenuTimeout = 0;
|
if(bUsed)
|
||||||
|
{
|
||||||
|
bUsed = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_hideMain();
|
||||||
|
if(!_Source()) //Different source selected
|
||||||
|
LoadView();
|
||||||
|
else
|
||||||
|
_showMain();
|
||||||
|
if(BTN_B_HELD)
|
||||||
|
bUsed = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(dpad_mode && (BTN_UP_PRESSED || BTN_DOWN_PRESSED || BTN_LEFT_PRESSED || BTN_RIGHT_PRESSED) && (m_btnMgr.selected(m_mainBtnChannel) || m_btnMgr.selected(m_mainBtnUsb) || m_btnMgr.selected(m_mainBtnDML) || m_btnMgr.selected(m_mainBtnHomebrew) || m_btnMgr.selected(m_mainBtnEmu)))
|
if(dpad_mode && (BTN_UP_PRESSED || BTN_DOWN_PRESSED || BTN_LEFT_PRESSED || BTN_RIGHT_PRESSED) && (m_btnMgr.selected(m_mainBtnChannel) || m_btnMgr.selected(m_mainBtnUsb) || m_btnMgr.selected(m_mainBtnDML) || m_btnMgr.selected(m_mainBtnHomebrew) || m_btnMgr.selected(m_mainBtnEmu)))
|
||||||
{
|
{
|
||||||
@ -346,6 +361,8 @@ int CMenu::main(void)
|
|||||||
if(_Home()) //exit wiiflow
|
if(_Home()) //exit wiiflow
|
||||||
break;
|
break;
|
||||||
_showMain();
|
_showMain();
|
||||||
|
if(BTN_B_HELD)
|
||||||
|
bUsed = true;
|
||||||
}
|
}
|
||||||
else if(BTN_A_PRESSED)
|
else if(BTN_A_PRESSED)
|
||||||
{
|
{
|
||||||
@ -359,6 +376,8 @@ int CMenu::main(void)
|
|||||||
if(_Home()) //exit wiiflow
|
if(_Home()) //exit wiiflow
|
||||||
break;
|
break;
|
||||||
_showMain();
|
_showMain();
|
||||||
|
if(BTN_B_HELD)
|
||||||
|
bUsed = true;
|
||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_mainBtnChannel) || m_btnMgr.selected(m_mainBtnUsb) || m_btnMgr.selected(m_mainBtnDML) || m_btnMgr.selected(m_mainBtnHomebrew) || m_btnMgr.selected(m_mainBtnEmu))
|
else if(m_btnMgr.selected(m_mainBtnChannel) || m_btnMgr.selected(m_mainBtnUsb) || m_btnMgr.selected(m_mainBtnDML) || m_btnMgr.selected(m_mainBtnHomebrew) || m_btnMgr.selected(m_mainBtnEmu))
|
||||||
{
|
{
|
||||||
@ -386,6 +405,8 @@ int CMenu::main(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
_showMain();
|
_showMain();
|
||||||
|
if(BTN_B_HELD)
|
||||||
|
bUsed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_mainBtnInit2))
|
else if(m_btnMgr.selected(m_mainBtnInit2))
|
||||||
@ -398,6 +419,8 @@ int CMenu::main(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
_showMain();
|
_showMain();
|
||||||
|
if(BTN_B_HELD)
|
||||||
|
bUsed = true;
|
||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_mainBtnConfig))
|
else if(m_btnMgr.selected(m_mainBtnConfig))
|
||||||
{
|
{
|
||||||
@ -409,12 +432,16 @@ int CMenu::main(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
_showMain();
|
_showMain();
|
||||||
|
if(BTN_B_HELD)
|
||||||
|
bUsed = true;
|
||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_mainBtnInfo))
|
else if(m_btnMgr.selected(m_mainBtnInfo))
|
||||||
{
|
{
|
||||||
_hideMain();
|
_hideMain();
|
||||||
_about();
|
_about();
|
||||||
_showMain();
|
_showMain();
|
||||||
|
if(BTN_B_HELD)
|
||||||
|
bUsed = true;
|
||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_mainBtnDVD))
|
else if(m_btnMgr.selected(m_mainBtnDVD))
|
||||||
{
|
{
|
||||||
@ -427,6 +454,8 @@ int CMenu::main(void)
|
|||||||
memcpy(&hdr.id, "dvddvd", 6);
|
memcpy(&hdr.id, "dvddvd", 6);
|
||||||
_launchGame(&hdr, true);
|
_launchGame(&hdr, true);
|
||||||
_showMain();
|
_showMain();
|
||||||
|
if(BTN_B_HELD)
|
||||||
|
bUsed = true;
|
||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_mainBtnFavoritesOn) || m_btnMgr.selected(m_mainBtnFavoritesOff))
|
else if(m_btnMgr.selected(m_mainBtnFavoritesOn) || m_btnMgr.selected(m_mainBtnFavoritesOff))
|
||||||
{
|
{
|
||||||
@ -441,6 +470,8 @@ int CMenu::main(void)
|
|||||||
_game(BTN_B_HELD);
|
_game(BTN_B_HELD);
|
||||||
if(m_exit)
|
if(m_exit)
|
||||||
break;
|
break;
|
||||||
|
if(BTN_B_HELD)
|
||||||
|
bUsed = true;
|
||||||
m_cf.cancel();
|
m_cf.cancel();
|
||||||
_showMain();
|
_showMain();
|
||||||
}
|
}
|
||||||
@ -453,6 +484,8 @@ int CMenu::main(void)
|
|||||||
// Event handler to show categories for selection
|
// Event handler to show categories for selection
|
||||||
_hideMain();
|
_hideMain();
|
||||||
_CategorySettings();
|
_CategorySettings();
|
||||||
|
if(BTN_B_HELD)
|
||||||
|
bUsed = true;
|
||||||
_showMain();
|
_showMain();
|
||||||
_initCF();
|
_initCF();
|
||||||
}
|
}
|
||||||
@ -466,10 +499,13 @@ int CMenu::main(void)
|
|||||||
LoadView();
|
LoadView();
|
||||||
else
|
else
|
||||||
_showMain();
|
_showMain();
|
||||||
|
if(BTN_B_HELD)
|
||||||
|
bUsed = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if(!neek2o())
|
else if(!neek2o())
|
||||||
{
|
{
|
||||||
|
bUsed = true;
|
||||||
m_cfg.setBool("NAND", "disable", !m_cfg.getBool("NAND", "disable", true));
|
m_cfg.setBool("NAND", "disable", !m_cfg.getBool("NAND", "disable", true));
|
||||||
gprintf("EmuNand is %s\n", m_cfg.getBool("NAND", "disable", true) ? "Disabled" : "Enabled");
|
gprintf("EmuNand is %s\n", m_cfg.getBool("NAND", "disable", true) ? "Disabled" : "Enabled");
|
||||||
m_current_view = COVERFLOW_CHANNEL;
|
m_current_view = COVERFLOW_CHANNEL;
|
||||||
@ -478,6 +514,7 @@ int CMenu::main(void)
|
|||||||
}
|
}
|
||||||
else if(m_btnMgr.selected(m_mainBtnNext) || m_btnMgr.selected(m_mainBtnPrev))
|
else if(m_btnMgr.selected(m_mainBtnNext) || m_btnMgr.selected(m_mainBtnPrev))
|
||||||
{
|
{
|
||||||
|
bUsed = true;
|
||||||
const char *domain = _domainFromView();
|
const char *domain = _domainFromView();
|
||||||
int sorting = m_cfg.getInt(domain, "sort", SORT_ALPHA);
|
int sorting = m_cfg.getInt(domain, "sort", SORT_ALPHA);
|
||||||
if (sorting != SORT_ALPHA && sorting != SORT_PLAYERS && sorting != SORT_WIFIPLAYERS && sorting != SORT_GAMEID)
|
if (sorting != SORT_ALPHA && sorting != SORT_PLAYERS && sorting != SORT_WIFIPLAYERS && sorting != SORT_GAMEID)
|
||||||
@ -510,22 +547,24 @@ int CMenu::main(void)
|
|||||||
LoadView();
|
LoadView();
|
||||||
else
|
else
|
||||||
_showMain();
|
_showMain();
|
||||||
|
if(BTN_B_HELD)
|
||||||
|
bUsed = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(WROLL_LEFT)
|
else if(WROLL_LEFT)
|
||||||
{
|
{
|
||||||
m_cf.left();
|
m_cf.left();
|
||||||
SourceMenuTimeout = 0;
|
bUsed = true;
|
||||||
}
|
}
|
||||||
else if(WROLL_RIGHT)
|
else if(WROLL_RIGHT)
|
||||||
{
|
{
|
||||||
m_cf.right();
|
m_cf.right();
|
||||||
SourceMenuTimeout = 0;
|
bUsed = true;
|
||||||
}
|
}
|
||||||
if(!BTN_B_HELD)
|
if(!BTN_B_HELD)
|
||||||
{
|
{
|
||||||
SourceMenuTimeout = 0;
|
//SourceMenuTimeout = 0;
|
||||||
if(BTN_UP_REPEAT || RIGHT_STICK_UP)
|
if(BTN_UP_REPEAT || RIGHT_STICK_UP)
|
||||||
m_cf.up();
|
m_cf.up();
|
||||||
else if(BTN_RIGHT_REPEAT || RIGHT_STICK_RIGHT)
|
else if(BTN_RIGHT_REPEAT || RIGHT_STICK_RIGHT)
|
||||||
@ -563,11 +602,12 @@ int CMenu::main(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
bheld = true;
|
||||||
const char *domain = _domainFromView();
|
const char *domain = _domainFromView();
|
||||||
//Search by Alphabet
|
//Search by Alphabet
|
||||||
if(BTN_DOWN_PRESSED || BTN_UP_PRESSED)
|
if(BTN_DOWN_PRESSED || BTN_UP_PRESSED)
|
||||||
{
|
{
|
||||||
SourceMenuTimeout = 0;
|
bUsed = true;
|
||||||
int sorting = m_cfg.getInt(domain, "sort", SORT_ALPHA);
|
int sorting = m_cfg.getInt(domain, "sort", SORT_ALPHA);
|
||||||
if(sorting != SORT_ALPHA && sorting != SORT_PLAYERS && sorting != SORT_WIFIPLAYERS && sorting != SORT_GAMEID)
|
if(sorting != SORT_ALPHA && sorting != SORT_PLAYERS && sorting != SORT_WIFIPLAYERS && sorting != SORT_GAMEID)
|
||||||
{
|
{
|
||||||
@ -595,7 +635,7 @@ int CMenu::main(void)
|
|||||||
}
|
}
|
||||||
else if(BTN_LEFT_PRESSED)
|
else if(BTN_LEFT_PRESSED)
|
||||||
{
|
{
|
||||||
SourceMenuTimeout = 0;
|
bUsed = true;
|
||||||
if(b_lr_mode)
|
if(b_lr_mode)
|
||||||
m_cf.pageUp();
|
m_cf.pageUp();
|
||||||
else
|
else
|
||||||
@ -603,7 +643,7 @@ int CMenu::main(void)
|
|||||||
}
|
}
|
||||||
else if(BTN_RIGHT_PRESSED)
|
else if(BTN_RIGHT_PRESSED)
|
||||||
{
|
{
|
||||||
SourceMenuTimeout = 0;
|
bUsed = true;
|
||||||
if(b_lr_mode)
|
if(b_lr_mode)
|
||||||
m_cf.pageDown();
|
m_cf.pageDown();
|
||||||
else
|
else
|
||||||
@ -611,7 +651,7 @@ int CMenu::main(void)
|
|||||||
}
|
}
|
||||||
else if(BTN_PLUS_PRESSED && !m_locked)
|
else if(BTN_PLUS_PRESSED && !m_locked)
|
||||||
{
|
{
|
||||||
SourceMenuTimeout = 0;
|
bUsed = true;
|
||||||
u32 sort = 0;
|
u32 sort = 0;
|
||||||
sort = loopNum((m_cfg.getInt(domain, "sort", 0)) + 1, SORT_MAX - 1);
|
sort = loopNum((m_cfg.getInt(domain, "sort", 0)) + 1, SORT_MAX - 1);
|
||||||
m_cf.setSorting((Sorting)sort);
|
m_cf.setSorting((Sorting)sort);
|
||||||
@ -639,7 +679,7 @@ int CMenu::main(void)
|
|||||||
}
|
}
|
||||||
else if(BTN_MINUS_PRESSED && !m_locked)
|
else if(BTN_MINUS_PRESSED && !m_locked)
|
||||||
{
|
{
|
||||||
SourceMenuTimeout = 0;
|
bUsed = true;
|
||||||
bool block = m_current_view == COVERFLOW_CHANNEL && (m_cfg.getBool("NAND", "disable", true) || neek2o());
|
bool block = m_current_view == COVERFLOW_CHANNEL && (m_cfg.getBool("NAND", "disable", true) || neek2o());
|
||||||
char *partition;
|
char *partition;
|
||||||
if(!block)
|
if(!block)
|
||||||
@ -687,22 +727,6 @@ int CMenu::main(void)
|
|||||||
_initCF();
|
_initCF();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!SourceMenuTimeout && !bheld)
|
|
||||||
{
|
|
||||||
SourceMenuTimeout = time(0);
|
|
||||||
bheld = true;
|
|
||||||
}
|
|
||||||
if(SourceMenuTimeout && (time(0) - SourceMenuTimeout > 1)) //Source Menu requested
|
|
||||||
{
|
|
||||||
SourceMenuTimeout = 0;
|
|
||||||
_hideMain();
|
|
||||||
if(!_Source()) //Different source selected
|
|
||||||
LoadView();
|
|
||||||
else
|
|
||||||
_showMain();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(done==0 && m_cat.getBool("GENERAL", "category_on_start", false))
|
if(done==0 && m_cat.getBool("GENERAL", "category_on_start", false))
|
||||||
@ -711,6 +735,8 @@ int CMenu::main(void)
|
|||||||
// show categories menu
|
// show categories menu
|
||||||
_hideMain();
|
_hideMain();
|
||||||
_CategorySettings();
|
_CategorySettings();
|
||||||
|
if(BTN_B_HELD)
|
||||||
|
bUsed = true;
|
||||||
_showMain();
|
_showMain();
|
||||||
_initCF();
|
_initCF();
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ void CMenu::_hideSource(bool instant)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(i = 0; i < 12; ++i)
|
for(i = 0; i < 12; ++i)
|
||||||
m_btnMgr.hide(m_sourceBtnSource[i]);
|
m_btnMgr.hide(m_sourceBtnSource[i], instant);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenu::_showSource(void)
|
void CMenu::_showSource(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user