def opt12(self, p_iJoy = None, p_iLine = None): try: self.m_oOCClass except: self.m_oOCClass = OCMNGR() p_lLines = {} if p_iJoy == None: return self.opt12_datas() if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] if not self.m_oOCClass.status(): return p_sINI = 'dtparam=sd_overclock' # overclock value to get new = explore_list(p_iJoy, value, list) if new != None: self.info("Please Wait", "icon_clock") self.m_oOCClass.set_oc_value(p_sINI, new) value2 = self.m_oOCClass.get_ini(p_sINI) if self.m_oOCClass.is_base_value(p_sINI, value2): p_lLines.update({'icon': None}) self.m_lLines[p_iLine]['color_val'] = "type_color_1" else: p_lLines.update({'icon': "icon_warn2"}) self.m_lLines[p_iLine]['color_val'] = "type_color_6" if self.m_oOCClass.is_base_value(p_sINI, value): self.info(["SD Card Overclocking", " Only for UHD SDCARDs.", " Don't try with", " non-UHD SDCH Cards!"], 'icon_warn') time.sleep(6) self.m_lLines[p_iLine]['value'] = value2 self.info()
def opt1(self, p_iJoy = None, p_iLine = None): try: self.m_oOCClass except: self.m_oOCClass = OCMNGR() p_lLines = {} if p_iJoy == None: return self.opt1_datas() if p_iJoy & CRT_OK: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] if not self.m_oOCClass.compatible(): return new = explore_list(p_iJoy, value, list) if new == False: self.info("Please Wait", "icon_clock") self.m_oOCClass.disable() self._auto_load_datas(True) elif new == True: self.info(["Only advanced users!", " Overclock can damage", " your Raspberry Pi.", " You may experience", " instability, hungs or", " system overheating."], 'icon_warn') time.sleep(7) self.info("Please Wait", "icon_clock") self.m_oOCClass.enable() value = self.m_oOCClass.status() self.info() self.m_lLines[p_iLine]['value'] = value
def opt1(self, p_iJoy=None, p_iLine=None): p_lLines = {} try: self.m_oKeybCTRLClass except: self.m_oKeybCTRLClass = CTRLSMgmt() if p_iJoy == None: return self.opt1_datas() if p_iJoy & CRT_OK: if self.m_lLines[p_iLine]['value'] == "[FORCED]": self.info("PI2JAMMA is enabled", "icon_info") time.sleep(2) self.info() return list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) self.info("Please wait", "icon_clock") if new: self.m_oKeybCTRLClass.pi2jamma_enable_controls() ini_set(CRT_UTILITY_FILE, 'keyb_ipac', 'true') else: self.m_oKeybCTRLClass.pi2jamma_disable_controls() ini_set(CRT_UTILITY_FILE, 'keyb_ipac', 'false') value = self.m_oKeybCTRLClass.check_keyboard_enabled() self.m_lLines[p_iLine]['value'] = value if value: self.info([ "Enabled IPAC/Keyboard", "MAME Layout for 2 Players", "in Retroarch and ES.", " ", "Enable only if you are not", "going to use a joystick!" ], "icon_info") time.sleep(6) self.info()
def opt1(self, p_iJoy = None, p_iLine = None): try: self.m_oOLEDClass except: self.m_oOLEDClass = oled() p_lLines = {} if p_iJoy == None: return self.opt1_datas() if p_iJoy & CRT_OK: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] if value == "N/A": self.info(["I2C JAMMA controls", "found, can't enable", "\u220fCRT Display."], "icon_info") time.sleep(4) self.info() return new = explore_list(p_iJoy, value, list) self.info("Please Wait", "icon_clock") if new == False: self.m_oOLEDClass.stop() elif new == True: self.m_oOLEDClass.init() self.info("Cheking Service", "icon_clock") time.sleep(1) value = self.m_oOLEDClass.check() if not value and new == True: self.m_oOLEDClass.stop() self.info(["Can't load \u220fCRT", " OLED Display"], "icon_warn") time.sleep(2) self.info() self.m_lLines[p_iLine]['value'] = value
def opt10(self, p_iJoy=None, p_iLine=None): p_lLines = {} if p_iJoy == None: return self.opt10_datas() if p_iJoy & CRT_OK: if self.m_lLines[p_iLine]['value'] == "N/A": self.info("FastBoot is enabled", "icon_info") time.sleep(2) self.info() return elif p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] if value == "N/A": return new = explore_list(p_iJoy, value, list) if new: if new == "Disabled": ini_set(RETROPIE_RUNCOMMAND_CFG_FILE, "image_delay", "0") self.info("Please Wait", "icon_clock") launching_images(False) self.info() else: ini_set(RETROPIE_RUNCOMMAND_CFG_FILE, "image_delay", new.replace('s', '')) if new == "1s" and value == "Disabled": self.info("Please Wait", "icon_clock") launching_images(True) self.info() self.m_lLines[p_iLine].update({'value': new})
def opt3(self, p_iJoy=None, p_iLine=None): try: self.m_oNETClass except: self.m_oNETClass = netplay() p_lLines = {} if p_iJoy == None: return self.opt3_datas() if p_iJoy & CRT_OK: if not self.m_oNETClass.status(): self.info("Enable Netplay", "icon_info") time.sleep(2) self.info() return if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT: if not self.m_oNETClass.status(): return list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new and new == self.m_oNETClass.mode(new).title(): self.m_lLines[p_iLine]['value'] = new if new.lower() == "host": self.info([ "Check your router", "has configured port", "NAT to your raspberry" ], "icon_info") time.sleep(2) self.info()
def opt4(self, p_iJoy=None, p_iLine=None): try: self.m_oWIFIClass except: self.m_oWIFIClass = wifi() if p_iJoy == None: return self.opt4_datas() if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT: if self.m_oWIFIClass.get_mode().lower() == "manual": return list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new: self.m_oWIFIClass.ssid(new) self.m_lLines[p_iLine]['value'] = new elif p_iJoy & CRT_OK: if self.m_oWIFIClass.get_mode().lower() == "manual": value = self.m_lLines[p_iLine]['value'] new = self._launch_kbd("", 30).strip() if new: self.m_oWIFIClass.ssid(new) self.m_lLines[p_iLine]['value'] = new elif self.m_oWIFIClass.get_mode().lower() == "detect": value = self.m_lLines[p_iLine]['value'] self.info("Scanning SSIDs", "icon_clock") list = self.m_oWIFIClass.detect(value) if list: self.m_lLines[p_iLine]['options'] = list self.m_lLines[p_iLine][ 'value'] = self.m_oWIFIClass.get_ssid() self.info()
def opt11(self, p_iJoy=None, p_iLine=None): p_lLines = {} if p_iJoy == None: return self.opt11_datas() if p_iJoy & CRT_OK: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if not new: ini_set(CRT_UTILITY_FILE, "scummvm_arc", "false") elif new: ini_set(CRT_UTILITY_FILE, "scummvm_arc", "true") self.m_lLines[p_iLine].update({'value': new})
def opt6(self, p_iJoy=None, p_iLine=None): p_lLines = {} if p_iJoy == None: return self.opt6_datas() if p_iJoy & CRT_OK: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new == False: set_xml_value_esconfig("VideoOmxPlayer", "false") elif new == True: set_xml_value_esconfig("VideoOmxPlayer", "true") self.m_lLines[p_iLine].update({'value': new})
def opt12(self, p_iJoy=None, p_iLine=None): p_lLines = {} if p_iJoy == None: return self.opt12_datas() if p_iJoy & CRT_OK: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new: ini_set(RA_CFG_FILE, "menu_driver", "rgui") elif not new: ini_set(RA_CFG_FILE, "menu_driver", 'Null') self.m_lLines[p_iLine].update({'value': new})
def opt3(self, p_iJoy=None, p_iLine=None): p_lLines = {} if p_iJoy == None: return self.opt3_datas() if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new: value = new.lower() set_xml_value_esconfig("ScreenSaverBehavior", value) self.m_lLines[p_iLine].update({'value': new})
def opt9(self, p_iJoy=None, p_iLine=None): p_lLines = {} if p_iJoy == None: return self.opt9_datas() if p_iJoy & CRT_OK: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new: fix_es_menu_font() elif not new: restore_es_menu_font() value = check_es_menu_font() self.m_lLines[p_iLine].update({'value': value})
def opt1(self, p_iJoy = None, p_iLine = None): p_lLines = {} if p_iJoy == None: return self.opt1_datas() if p_iJoy & CRT_OK: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new: ini_set(CRT_UTILITY_FILE, "daphne_remap", "true") else: ini_set(CRT_UTILITY_FILE, "daphne_remap", "false") value = ini_get(CRT_UTILITY_FILE, "daphne_remap") == "true" self.m_lLines[p_iLine]['value'] = value
def opt8(self, p_iJoy=None, p_iLine=None): p_lLines = {} if p_iJoy == None: return self.opt8_datas() if p_iJoy & CRT_OK: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new: hide_retropie_menu(False) elif not new: hide_retropie_menu(True) value = check_retropie_menu() self.m_lLines[p_iLine].update({'value': new})
def opt1(self, p_iJoy=None, p_iLine=None): try: self.m_oNETClass except: self.m_oNETClass = netplay() if p_iJoy == None: return self.opt1_datas() if p_iJoy & CRT_OK: value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value) if new: cfg = self.m_oNETClass.enable() else: cfg = self.m_oNETClass.disable() self.m_lLines[p_iLine]['value'] = cfg
def opt7(self, p_iJoy=None, p_iLine=None): p_lLines = {} if p_iJoy == None: return self.opt7_datas() if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new: self.info("Please Wait," "icon_clock") set_xml_value_esconfig("ThemeSet", new) value = get_xml_value_esconfig("ThemeSet") self.m_lLines[p_iLine].update({'value': value}) self.info()
def opt4(self, p_iJoy = None, p_iLine = None): try: self.m_oBGMClass except: self.m_oBGMClass = background_music() p_lLines = {} if p_iJoy == None: return self.opt4_datas() if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new: new = int(new.replace("%", '')) vol = self.m_oBGMClass.change_volume(new) if vol == new: self.m_lLines[p_iLine]['value'] = str(new) + "%"
def opt2(self, p_iJoy=None, p_iLine=None): p_lLines = {} if p_iJoy == None: return self.opt2_datas() if p_iJoy & CRT_OK: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) self.info("Please wait", "icon_clock") if new: self.m_oKeybCTRLClass.xinmo_usb_driver_enable() else: self.m_oKeybCTRLClass.xinmo_usb_driver_disable() value = self.m_oKeybCTRLClass.check_xinmo() self.m_lLines[p_iLine]['value'] = new self.info()
def opt4(self, p_iJoy=None, p_iLine=None): p_lLines = {} if p_iJoy == None: return self.opt4_datas() if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new: if new == "Runcommand": ini_set(CRT_UTILITY_FILE, "fast_boot", "False") elif new == "FastBoot": ini_set(CRT_UTILITY_FILE, "fast_boot", "True") self.m_lLines[p_iLine].update({'value': new})
def opt3(self, p_iJoy=None, p_iLine=None): try: self.m_oWIFIClass except: self.m_oWIFIClass = wifi() if p_iJoy == None: return self.opt3_datas() if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new: self.m_oWIFIClass.mode(new) self.m_lLines[p_iLine]['value'] = new
def opt3(self, p_iJoy=None, p_iLine=None): p_lLines = {} if p_iJoy == None: return self.opt3_datas() if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new: if new == "Default": ini_set(RETROPIE_RUNCOMMAND_CFG_FILE, "governor", "") else: ini_set(RETROPIE_RUNCOMMAND_CFG_FILE, "governor", new.lower()) self.m_lLines[p_iLine].update({'value': new})
def opt1(self, p_iJoy = None, p_iLine = None): p_lLines = {} if p_iJoy == None: return self.opt1_datas() if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new != None: new = int(new.replace("%", '')) vol = self.m_oSYSVOLClass.set_vol(new) if vol == new: if vol > 86: self.m_lLines[p_iLine]['color_val'] = "type_color_6" else: self.m_lLines[p_iLine]['color_val'] = "type_color_1" self.m_lLines[p_iLine]['value'] = str(new) + "%"
def opt4(self, p_iJoy = None, p_iLine = None): try: self.m_oOLEDClass except: self.m_oOLEDClass = oled() p_lLines = {} if p_iJoy == None: return self.opt4_datas() if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] if value == "--": return new = explore_list(p_iJoy, value, list) if new: self.m_oOLEDClass.set_config('scr_info_mem', new) value = self.m_oOLEDClass.get_config('scr_info_mem') self.m_lLines[p_iLine]['value'] = value
def opt1(self, p_iJoy=None, p_iLine=None): p_lLines = {} if p_iJoy == None: return self.opt1_datas() if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new: if new == "Manual": value = "manual" elif new == "50hz": value = "50" elif new == "60hz": value = "60" elif new == "Auto": value = "auto" ini_set(CRT_UTILITY_FILE, "freq_selector", value) self.m_lLines[p_iLine].update({'value': new})
def opt3(self, p_iJoy = None, p_iLine = None): p_lLines = {} if p_iJoy == None: return self.opt3_datas() if p_iJoy & CRT_OK: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) self.info("Please Wait", "icon_clock") if new == False: self.m_oBGMClass.stop() elif new == True: self.m_oBGMClass.init() value = self.m_oBGMClass.check() self.m_lLines[p_iLine]['value'] = value time.sleep(0.5) self.info()
def opt6(self, p_iJoy = None, p_iLine = None): try: self.m_oBGMClass except: self.m_oBGMClass = background_music() p_lLines = {} if p_iJoy == None: return self.opt6_datas() if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new: self.info("Changing Folder", "icon_clock") self.m_oBGMClass.change_music(new) value = self.m_oBGMClass.get_active_folder() self.m_lLines[p_iLine]['value'] = value self.info()
def opt4(self, p_iJoy = None, p_iLine = None): try: self.m_oNETClass except: self.m_oNETClass = netplay() if p_iJoy == None: return self.opt4_datas() if p_iJoy & CRT_OK: if not self.m_oNETClass.status(): self.info("Enable Netplay", "icon_info") time.sleep(2) self.info() return value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value) if new: cfg = self.m_oNETClass.stateless_enable() else: cfg = self.m_oNETClass.stateless_disable() self.m_lLines[p_iLine]['value'] = cfg
def opt2(self, p_iJoy=None, p_iLine=None): try: self.m_oWIFIClass except: self.m_oWIFIClass = wifi() if p_iJoy == None: return self.opt2_datas() if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new: self.info("Please Wait", "icon_info") self.m_oWIFIClass.country(new) value = self.m_oWIFIClass.get_country() self.m_lLines[p_iLine]['value'] = value self.info()
def opt2(self, p_iJoy = None, p_iLine = None): p_lLines = {} try: self.m_oSYSVOLClass except: self.m_oSYSVOLClass = sys_volume() if p_iJoy == None: return self.opt2_datas() if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT: list = self.m_lLines[p_iLine]['options'] value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value, list) if new != None: self.info("Please wait", "icon_clock") preset = self.m_oSYSVOLClass.preset(new.lower()) preset = preset.title() if preset == new: self.m_lLines[p_iLine]['value'] = new self.info()
def opt3(self, p_iJoy = None, p_iLine = None): try: self.m_oNETClass except: self.m_oNETClass = netplay() if p_iJoy == None: return self.opt3_datas() if p_iJoy & CRT_OK: if not self.m_oNETClass.status(): self.info("Enable Netplay", "icon_info") time.sleep(2) self.info() return if self.m_oNETClass.get_mode().lower() == "client": return value = self.m_lLines[p_iLine]['value'] new = explore_list(p_iJoy, value) if new: cfg = self.m_oNETClass.lobby_enable() else: cfg = self.m_oNETClass.lobby_disable() self.m_lLines[p_iLine]['value'] = cfg