int CMenu::_config4(void) { int change = CONFIG_PAGE_NO_CHANGE; _showConfig4(); while(!m_exit) { change = _configCommon(); if (change != CONFIG_PAGE_NO_CHANGE) break; if (BTN_A_PRESSED) { if (m_btnMgr.selected(m_config4BtnHome)) { int exit_to = (int)loopNum((u32)m_cfg.getInt("GENERAL", "exit_to", 0) + 1, ARRAY_SIZE(CMenu::_exitTo)); m_cfg.setInt("GENERAL", "exit_to", exit_to); Sys_ExitTo(exit_to); _showConfig4(); } else if (m_btnMgr.selected(m_config4BtnSaveFavMode)) { m_cfg.setBool("GENERAL", "save_favorites_mode", !m_cfg.getBool("GENERAL", "save_favorites_mode")); _showConfig4(); } else if (m_btnMgr.selected(m_config4BtnPathManager)) { _hideConfig4(); _Paths(); _showConfig4(); break; } else if (m_btnMgr.selected(m_config4BtnReturnToP)) { currentChannelIndex = (currentChannelIndex >= amountOfChannels - 1) ? -1 : currentChannelIndex + 1; if (currentChannelIndex == -1) m_cfg.remove("GENERAL", "returnto"); else m_cfg.setString("GENERAL", "returnto", ChannelHandle.GetId(currentChannelIndex)); _showConfig4(); } else if (m_btnMgr.selected(m_config4BtnReturnToM)) { if (currentChannelIndex == -1) currentChannelIndex = amountOfChannels; currentChannelIndex--; if (currentChannelIndex == -1) m_cfg.remove("GENERAL", "returnto"); else m_cfg.setString("GENERAL", "returnto", ChannelHandle.GetId(currentChannelIndex)); _showConfig4(); } } } _hideConfig4(); return change; }
int CMenu::_configScreen(void) { int change = CONFIG_PAGE_NO_CHANGE; SetupInput(); _showConfigScreen(); while(!m_exit) { change = _configCommon(); if (change != CONFIG_PAGE_NO_CHANGE) break; if (BTN_A_REPEAT || BTN_A_PRESSED) { if (m_btnMgr.selected(m_configScreenBtnTVWidthP) || m_btnMgr.selected(m_configScreenBtnTVWidthM) || m_btnMgr.selected(m_configScreenBtnTVHeightP) || m_btnMgr.selected(m_configScreenBtnTVHeightM) || m_btnMgr.selected(m_configScreenBtnTVXP) || m_btnMgr.selected(m_configScreenBtnTVXM) || m_btnMgr.selected(m_configScreenBtnTVYP) || m_btnMgr.selected(m_configScreenBtnTVYM)) { int step = 0; if (m_btnMgr.selected(m_configScreenBtnTVWidthM) || m_btnMgr.selected(m_configScreenBtnTVHeightM)) step = 2; else if (m_btnMgr.selected(m_configScreenBtnTVWidthP) || m_btnMgr.selected(m_configScreenBtnTVHeightP)) step = -2; else if (m_btnMgr.selected(m_configScreenBtnTVXP) || m_btnMgr.selected(m_configScreenBtnTVYM)) step = -1; else if (m_btnMgr.selected(m_configScreenBtnTVXM) || m_btnMgr.selected(m_configScreenBtnTVYP)) step = 1; if (m_btnMgr.selected(m_configScreenBtnTVWidthM) || m_btnMgr.selected(m_configScreenBtnTVWidthP)) m_cfg.setInt("GENERAL", "tv_width", min(max(512, m_cfg.getInt("GENERAL", "tv_width", 640) + step), 800)); else if (m_btnMgr.selected(m_configScreenBtnTVHeightM) || m_btnMgr.selected(m_configScreenBtnTVHeightP)) m_cfg.setInt("GENERAL", "tv_height", min(max(384, m_cfg.getInt("GENERAL", "tv_height", 480) + step), 600)); else if (m_btnMgr.selected(m_configScreenBtnTVXP) || m_btnMgr.selected(m_configScreenBtnTVXM)) m_cfg.setInt("GENERAL", "tv_x", min(max(-50, m_cfg.getInt("GENERAL", "tv_x", 0) + step), 50)); else if (m_btnMgr.selected(m_configScreenBtnTVYP) || m_btnMgr.selected(m_configScreenBtnTVYM)) m_cfg.setInt("GENERAL", "tv_y", min(max(-30, m_cfg.getInt("GENERAL", "tv_y", 0) + step), 30)); _showConfigScreen(); m_vid.set2DViewport(m_cfg.getInt("GENERAL", "tv_width", 640), m_cfg.getInt("GENERAL", "tv_height", 480), m_cfg.getInt("GENERAL", "tv_x", 0), m_cfg.getInt("GENERAL", "tv_y", 0)); } } } _hideConfigScreen(); return change; }