- fixed categories page button

- changed d-pad left from homebrew to emu
- disabled categories for emu mode for now to keep categories.ini from getting messed up
This commit is contained in:
fledge68 2012-04-30 12:38:35 +00:00
parent bb478d1377
commit f062eff356
3 changed files with 27 additions and 23 deletions

View File

@ -1463,15 +1463,18 @@ void CMenu::_initCF(void)
strncpy((char *) m_gameList[i].hdr.id, "JODI", 6); strncpy((char *) m_gameList[i].hdr.id, "JODI", 6);
string id = string((const char *)m_gameList[i].hdr.id, m_current_view == COVERFLOW_CHANNEL ? 4 : 6); string id = string((const char *)m_gameList[i].hdr.id, m_current_view == COVERFLOW_CHANNEL ? 4 : 6);
if (m_current_view != COVERFLOW_EMU)
{
string idcats = m_cat.getString("CATEGORIES", id, "").c_str(); string idcats = m_cat.getString("CATEGORIES", id, "").c_str();
if (idcats.length() < 21 && idcats.length() > 0) if (idcats.length() < 21 && idcats.length() > 0)
{ {
idcats.append((21-idcats.length()), '0'); idcats.append((21-idcats.length()), '0');
m_cat.setString("CATEGORIES", id, idcats); m_cat.setString("CATEGORIES", id, idcats);
} }
}
if ((!m_favorites || m_gcfg1.getBool("FAVORITES", id, false)) && (!m_locked || !m_gcfg1.getBool("ADULTONLY", id, false))) if ((!m_favorites || m_gcfg1.getBool("FAVORITES", id, false)) && (!m_locked || !m_gcfg1.getBool("ADULTONLY", id, false)))
{ {
if (catviews[0] == '0') if (catviews[0] == '0' && m_current_view != COVERFLOW_EMU)
{ {
const char *idcats = m_cat.getString("CATEGORIES", id, "").c_str(); const char *idcats = m_cat.getString("CATEGORIES", id, "").c_str();
if (strlen(idcats) == 0) continue; if (strlen(idcats) == 0) continue;

View File

@ -31,6 +31,11 @@ void CMenu::_showCategorySettings(void)
for (u32 i = 0; i < ARRAY_SIZE(m_categoryLblUser); ++i) if (m_categoryLblUser[i] != -1u) m_btnMgr.show(m_categoryLblUser[i]); for (u32 i = 0; i < ARRAY_SIZE(m_categoryLblUser); ++i) if (m_categoryLblUser[i] != -1u) m_btnMgr.show(m_categoryLblUser[i]);
m_btnMgr.show(m_categoryLblTitle); m_btnMgr.show(m_categoryLblTitle);
m_btnMgr.show(m_categoryBtnBack); m_btnMgr.show(m_categoryBtnBack);
_updateCheckboxes();
}
void CMenu::_updateCheckboxes(void)
{
if (m_max_categories > 10) if (m_max_categories > 10)
{ {
m_btnMgr.setText(m_categoryLblPage, wfmt(L"%i / 2", C_curPage)); m_btnMgr.setText(m_categoryLblPage, wfmt(L"%i / 2", C_curPage));
@ -38,11 +43,6 @@ void CMenu::_showCategorySettings(void)
m_btnMgr.show(m_categoryBtnPageM); m_btnMgr.show(m_categoryBtnPageM);
m_btnMgr.show(m_categoryBtnPageP); m_btnMgr.show(m_categoryBtnPageP);
} }
_updateCheckboxes();
}
void CMenu::_updateCheckboxes(void)
{
for (int i=0; i<21; ++i) for (int i=0; i<21; ++i)
{ {
m_btnMgr.hide(m_categoryBtn[i]); m_btnMgr.hide(m_categoryBtn[i]);
@ -82,6 +82,7 @@ void CMenu::_updateCheckboxes(void)
void CMenu::_CategorySettings(bool fromGameSet) void CMenu::_CategorySettings(bool fromGameSet)
{ {
if (m_current_view == COVERFLOW_EMU) return;
SetupInput(); SetupInput();
C_curPage = 1; C_curPage = 1;
gameSet = fromGameSet; gameSet = fromGameSet;

View File

@ -199,7 +199,6 @@ int CMenu::main(void)
if(m_Emulator_boot) if(m_Emulator_boot)
m_current_view = COVERFLOW_EMU; m_current_view = COVERFLOW_EMU;
u32 cv = m_current_view;
m_reload = false; m_reload = false;
static u32 disc_check = 0; static u32 disc_check = 0;
int done = 0; int done = 0;
@ -284,29 +283,30 @@ int CMenu::main(void)
} }
break; break;
} }
m_btnMgr.noClick(true); if ((BTN_UP_PRESSED || BTN_DOWN_PRESSED || BTN_LEFT_PRESSED || BTN_RIGHT_PRESSED) && dpad_mode && (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)))
cv = m_current_view;
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)) && dpad_mode && (BTN_UP_PRESSED || BTN_DOWN_PRESSED || BTN_LEFT_PRESSED || BTN_RIGHT_PRESSED))
{ {
u32 lastView = m_current_view;
if (BTN_UP_PRESSED) if (BTN_UP_PRESSED)
m_current_view = COVERFLOW_USB; m_current_view = COVERFLOW_USB;
else if (BTN_DOWN_PRESSED && m_show_dml) else if (BTN_DOWN_PRESSED && m_show_dml)
m_current_view = COVERFLOW_DML; m_current_view = COVERFLOW_DML;
else if (BTN_LEFT_PRESSED && show_homebrew && (parental_homebrew || !m_locked)) else if (BTN_LEFT_PRESSED && show_emu)
m_current_view = COVERFLOW_HOMEBREW; m_current_view = COVERFLOW_EMU;
else if (BTN_RIGHT_PRESSED && show_channel) else if (BTN_RIGHT_PRESSED && show_channel)
m_current_view = COVERFLOW_CHANNEL; m_current_view = COVERFLOW_CHANNEL;
if (cv != m_current_view) LoadView(); if (lastView != m_current_view) LoadView();
continue;
} }
if (cv == m_current_view && !m_btnMgr.selected(m_mainBtnChannel) && !m_btnMgr.selected(m_mainBtnUsb) && !m_btnMgr.selected(m_mainBtnDML) && !m_btnMgr.selected(m_mainBtnHomebrew)) m_btnMgr.noClick(true);
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))
{ {
if (!m_btnMgr.selected(m_mainBtnQuit) && !BTN_B_HELD && (BTN_UP_REPEAT || RIGHT_STICK_UP)) if (!BTN_B_HELD && (BTN_UP_REPEAT || RIGHT_STICK_UP))
m_cf.up(); m_cf.up();
if (!m_btnMgr.selected(m_mainBtnQuit) && ((!BTN_B_HELD && (BTN_RIGHT_REPEAT || RIGHT_STICK_RIGHT)) || WROLL_RIGHT)) if ((!BTN_B_HELD && (BTN_RIGHT_REPEAT || RIGHT_STICK_RIGHT)) || WROLL_RIGHT)
m_cf.right(); m_cf.right();
if (!m_btnMgr.selected(m_mainBtnQuit) && !BTN_B_HELD && (BTN_DOWN_REPEAT || RIGHT_STICK_DOWN)) if (!BTN_B_HELD && (BTN_DOWN_REPEAT || RIGHT_STICK_DOWN))
m_cf.down(); m_cf.down();
if (!m_btnMgr.selected(m_mainBtnQuit) && ((!BTN_B_HELD && (BTN_LEFT_REPEAT || RIGHT_STICK_LEFT)) || WROLL_LEFT)) if ((!BTN_B_HELD && (BTN_LEFT_REPEAT || RIGHT_STICK_LEFT)) || WROLL_LEFT)
m_cf.left(); m_cf.left();
} }
m_btnMgr.noClick(false); m_btnMgr.noClick(false);