def show_auto(self): if fullscreen(): geometry = screen_geometry() self.set_fullscreen(True, geometry) Settings.set("__cursor_x", geometry[2]) Settings.set("__cursor_y", geometry[3]) elif maximized(): x, y, w, h = screen_geometry() self.set_maximized(True, (x, y, 960, 540)) else: super().show()
def configure_launcher_app(base_name, databases, default_platform_id, default_titlebar_color): Product.base_name = base_name for option_name in fsgamesys.OPENRETRO_DEFAULT_DATABASES: Option.get(option_name)["default"] = "0" Settings.set_default(option_name, "0") for option_name in [ Option.AMIGA_DATABASE, Option.CD32_DATABASE, Option.CDTV_DATABASE, ]: Option.get(option_name)["default"] = "0" Settings.set_default(option_name, "0") for option_name in databases: Option.get(option_name)["default"] = "1" Settings.set_default(option_name, "1") from fsgamesys.config.config import Config Config.set_default("platform", default_platform_id) Product.default_platform_id = default_platform_id if default_titlebar_color is not None: Settings.set_default("launcher_titlebar_bgcolor", default_titlebar_color) # Settings.set_default("launcher_titlebar_fgcolor", "#cccccc") import fsboot fsboot.set("base_dir_name", base_name) return "SYS:Launcher"
def main(self): self.setProgress("Logging out from openretro.org...") OGDClient().deauth(self.authToken) Settings.set("error_report_user_id", "") Settings.set("database_username", "") Settings.set("database_auth", "") # Clear legacy key Settings.set("database_password", "") return print("LogoutTask.main") self.setProgress("Starting logout process...") time.sleep(1) if self.isCancelled(): return self.setProgress("Logging out...") time.sleep(1) if self.isCancelled(): return raise Exception("Fail") self.setProgress("Completing...") time.sleep(1) if self.isCancelled(): return self.setProgress("Done...")
def monitor(): value = check_argument("monitor") if not value: value = Settings.get("monitor") if not value: value = "middle-left" return value
def screenshots_output_dir(cls): path = Settings.get("screenshots_output_dir") if not path: path = cls.portable_dir("screenshots_output_dir") if not path: path = os.path.join(get_documents_dir(), "Screenshots") if not os.path.exists(path): os.makedirs(path) return path
def fullscreen(): # If we have explicitly used --window as arguments, do # not enable fullscreen regardless of settings. if check_argument("window", ["maximize"]) in ["1", "maximize"]: return False # if check_argument("maximize") == "1": # return False value = check_argument("fullscreen") if not value: value = Settings.get("arcade_fullscreen") return value != "0"
def maximized(): # if check_argument("fullscreen") == "1": # return False # if check_argument("window") == "1": # return False # value = check_argument("window") == "maximize" value = check_argument("window", ["maximize"]) == "maximize" if value: return True else: value = Settings.get("arcade_maximized") return value == "1"
def driver(gscontext): driver = Settings.get(Option.SPECTRUM_EMULATOR) if not driver: driver = "fs-fuse" if driver == "fuse": return FuseSpectrumDriver(gscontext) elif driver == "fs-fuse": return FsFuseSpectrumDriver(gscontext) if driver == "mame": return MessSpectrumDriver(gscontext) elif driver == "mame-fs": return MessFsSpectrumDriver(gscontext) else: raise Exception('Unrecognized spectrum driver "{}"'.format(driver))
def _app_main_2(qapplication, appname): launcherapp = LauncherApp() theme = get_global_theme() initialize_qt_style(qapplication, theme) # debug_sys_stdout() app = Application() if appname.lower().endswith(":launcher"): if Settings.get(WORKSPACE_ON_STARTUP) == "1": wsopen("C:LoadWB") if appname: wsopen(appname) else: wsopen("SYS:Launcher") qapplication.exec_()
def main(): application = Application() initialize_application("fs-uae-arcade", version=launcher.version.VERSION) # fs_width, fs_height = fsui.get_screen_size() # cursor_position = None # use_window = False # use_window_decorations = True # use_fullscreen = True # use_fullscreen_window = False # use_top_clock = check_argument("top_clock") != "0" # use_top_logo = check_argument("top_logo") != "0" if System.macos: if fullscreen() or maximized(): if check_argument("system_autohide") == "1": os_x_set_system_ui_mode(K_UI_MODE_ALL_HIDDEN, K_UI_OPTION_AUTO_SHOW_MENU_BAR) elif running_in_gnome_3(): if fullscreen() or maximized(): # use_fullscreen = False # use_window_decorations = False # use_window = "maximized" if check_argument("system_autohide") == "1": handle_gnome_extensions() # cursor_position = fs_width - 1, fs_height - 1 # use_top_clock = False # use_top_logo = False # app.settings["fs-uae:fullscreen-mode::default"] = "window" else: # We want a normal window. pass Settings.set("__arcade", "1") # if windows: # pass # elif macosx: # # use_fullscreen_window = True # # Settings.instance().set("__fullscreen_mode", "window") # pass # else: # # app.settings["fs-uae:fullscreen-mode::default"] = "window" # pass # if check_argument("fullscreen"): # use_fullscreen = check_argument("fullscreen") == "1" # # if "--fullscreen-mode=fullscreen" in sys.argv: # use_fullscreen_window = False # elif "--fullscreen-mode=window" in sys.argv: # use_fullscreen_window = True # # if "--maximize" in sys.argv: # use_window = "maximized" # use_fullscreen = False # # if "--no-window-decorations" in sys.argv: # use_window_decorations = False # app.settings["game-center:fullscreen"] = \ # "1" if use_fullscreen else "0" # if use_fullscreen_window: # app.settings["game-center:fullscreen-mode"] = "window" # else: # app.settings["game-center:fullscreen-mode"] = "" # app.settings["game-center:window-decorations"] = \ # "1" if use_window_decorations else "0" # app.settings["game-center:maximize"] = \ # "1" if use_window == "maximized" else "0" # app.settings["game-center:top-clock"] = "1" if use_top_clock else "0" # app.settings["game-center:top-logo"] = "1" if use_top_logo else "0" ArcadeWindow().show_auto() # if cursor_position is not None: # os.environ["FSGS_RETURN_CURSOR_TO"] = "{0},{1}".format( # cursor_position[0], cursor_position[1]) application.run() print("application.run returned") application.stop() ImageLoader.get().stop() application.wait() print(" --- arcade.arcade_main.main is done ---") return