diff --git a/source/menu/menu.cpp b/source/menu/menu.cpp index 1146d5ab..2edc0de8 100644 --- a/source/menu/menu.cpp +++ b/source/menu/menu.cpp @@ -1463,15 +1463,18 @@ void CMenu::_initCF(void) 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 idcats = m_cat.getString("CATEGORIES", id, "").c_str(); - if (idcats.length() < 21 && idcats.length() > 0) + if (m_current_view != COVERFLOW_EMU) { - idcats.append((21-idcats.length()), '0'); - m_cat.setString("CATEGORIES", id, idcats); - } + string idcats = m_cat.getString("CATEGORIES", id, "").c_str(); + if (idcats.length() < 21 && idcats.length() > 0) + { + idcats.append((21-idcats.length()), '0'); + m_cat.setString("CATEGORIES", id, idcats); + } + } 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(); if (strlen(idcats) == 0) continue; diff --git a/source/menu/menu_categories.cpp b/source/menu/menu_categories.cpp index 1757c880..d4e95009 100644 --- a/source/menu/menu_categories.cpp +++ b/source/menu/menu_categories.cpp @@ -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]); m_btnMgr.show(m_categoryLblTitle); m_btnMgr.show(m_categoryBtnBack); + _updateCheckboxes(); +} + +void CMenu::_updateCheckboxes(void) +{ if (m_max_categories > 10) { 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_categoryBtnPageP); } - _updateCheckboxes(); -} - -void CMenu::_updateCheckboxes(void) -{ for (int i=0; i<21; ++i) { m_btnMgr.hide(m_categoryBtn[i]); @@ -82,6 +82,7 @@ void CMenu::_updateCheckboxes(void) void CMenu::_CategorySettings(bool fromGameSet) { + if (m_current_view == COVERFLOW_EMU) return; SetupInput(); C_curPage = 1; gameSet = fromGameSet; diff --git a/source/menu/menu_main.cpp b/source/menu/menu_main.cpp index e1260992..6b46173e 100644 --- a/source/menu/menu_main.cpp +++ b/source/menu/menu_main.cpp @@ -199,7 +199,6 @@ int CMenu::main(void) if(m_Emulator_boot) m_current_view = COVERFLOW_EMU; - u32 cv = m_current_view; m_reload = false; static u32 disc_check = 0; int done = 0; @@ -284,29 +283,30 @@ int CMenu::main(void) } break; } - m_btnMgr.noClick(true); - 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)) + 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))) { + u32 lastView = m_current_view; if (BTN_UP_PRESSED) m_current_view = COVERFLOW_USB; else if (BTN_DOWN_PRESSED && m_show_dml) m_current_view = COVERFLOW_DML; - else if (BTN_LEFT_PRESSED && show_homebrew && (parental_homebrew || !m_locked)) - m_current_view = COVERFLOW_HOMEBREW; + else if (BTN_LEFT_PRESSED && show_emu) + m_current_view = COVERFLOW_EMU; else if (BTN_RIGHT_PRESSED && show_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(); - 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(); - 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(); - 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_btnMgr.noClick(false);