def start_with_args(cls, args, **kwargs): print("FSUAE.start_with_args:", args) exe = cls.find_executable() print("current dir (cwd): ", getcwd()) print("using fs-uae executable:", exe) args = [exe] + args print(args) env = os.environ.copy() if settings.get(Option.FAKE_JOYSTICKS): try: fake_joysticks = int(settings.get(Option.FAKE_JOYSTICKS)) except ValueError: print( "WARNING: fake_joysticks contains invalid value", repr(settings.get(Option.FAKE_JOYSTICKS)), ) else: env["FSGS_FAKE_JOYSTICKS"] = str(fake_joysticks) FSUAE.add_environment_from_settings(env) process = subprocess.Popen( args, env=env, stdin=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs ) return process
def start_with_args(cls, args, **kwargs): print("FSUAE.start_with_args:", args) exe = cls.find_executable() print("current dir (cwd): ", getcwd()) print("using fs-uae executable:", exe) args = [exe] + args print(args) env = os.environ.copy() if settings.get(Option.FAKE_JOYSTICKS): try: fake_joysticks = int(settings.get(Option.FAKE_JOYSTICKS)) except ValueError: print( "WARNING: fake_joysticks contains invalid value", repr(settings.get(Option.FAKE_JOYSTICKS)), ) else: env["FSGS_FAKE_JOYSTICKS"] = str(fake_joysticks) FSUAE.add_environment_from_settings(env) process = subprocess.Popen(args, env=env, stdin=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs) return process
def new_config(): if openretro or settings.get(Option.PLATFORMS_FEATURE): platform_id = LauncherConfig.get(Option.PLATFORM) else: platform_id = None LauncherConfig.load_default_config(platform=platform_id) # Settings.set("config_changed", "1") LauncherSettings.set("parent_uuid", "")
def __init__(self, parent): super().__init__(parent) icon = fsui.Icon("database-settings", "pkg:workspace") title = gettext("Game Platforms") subtitle = "" self.add_header(icon, title, subtitle) self.hori_layout = None self.hori_counter = 0 if openretro or settings.get(Option.PLATFORMS_FEATURE) == "1": # self.add_section(gettext("Game Databases")) label = fsui.MultiLineLabel( self, gettext("Note: This is an experimental feature. " "Additional plugins are needed."), 640, ) self.layout.add(label, margin_top=20, margin_bottom=20) self.add_database_option(Platform.CPC, Option.CPC_DATABASE, "Amstrad CPC") self.add_database_option(Platform.ARCADE, Option.ARCADE_DATABASE, "Arcade") self.add_database_option(Platform.A7800, Option.A7800_DATABASE, "Atari 7800") self.add_database_option(Platform.C64, Option.C64_DATABASE, "Commodore 64") self.add_database_option(Platform.DOS, Option.DOS_DATABASE, "DOS") self.add_database_option(Platform.GB, Option.GB_DATABASE, "Game Boy") self.add_database_option(Platform.GBA, Option.GBA_DATABASE, "Game Boy Advance") self.add_database_option(Platform.GBC, Option.GBC_DATABASE, "Game Boy Color") self.add_database_option(Platform.SMS, Option.SMS_DATABASE, "Master System") self.add_database_option(Platform.SMD, Option.SMD_DATABASE, "Mega Drive") self.add_database_option(Platform.NEOGEO, Option.NEOGEO_DATABASE, "Neo-Geo") self.add_database_option(Platform.NES, Option.NES_DATABASE, "Nintendo") self.add_database_option(Platform.PSX, Option.PSX_DATABASE, "PlayStation") self.add_database_option(Platform.SNES, Option.SNES_DATABASE, "Super Nintendo") self.add_database_option(Platform.ST, Option.ST_DATABASE, "Atari ST") self.add_database_option(Platform.TG16, Option.TG16_DATABASE, "TurboGrafx-16") self.add_database_option(Platform.TGCD, Option.TGCD_DATABASE, "TurboGrafx-CD") self.add_database_option(Platform.ZXS, Option.ZXS_DATABASE, "ZX Spectrum")
def driver(fsgc): driver = settings.get(Option.CPC_EMULATOR) driver = "mame-fs" if not driver: driver = "mame-fs" if driver == "mame": return CpcMameDriver(fsgc) elif driver == "mame-fs": return CpcMameFsDriver(fsgc)
def driver(self, fsgc): driver = settings.get(Option.ARCADE_EMULATOR) if not driver: driver = "mame" if driver == "mame": return MameArcadeDriver(fsgc) elif driver == "fs-mame": return MameArcadeDriver(fsgc, fsemu=True) return None
def driver(self, fsgc): driver = settings.get(Option.ST_EMULATOR) if not driver: driver = "hatari-fs" if driver == "hatari": return HatariDriver(fsgc) elif driver == "hatari-fs": return HatariFsDriver(fsgc) return None
def driver(fsgc): driver = settings.get(Option.ZXS_EMULATOR) if not driver: driver = "fuse-fs" if driver == "fuse": return FuseSpectrumDriver(fsgc) elif driver == "fuse-fs": return FuseFsSpectrumDriver(fsgc) if driver == "mame": return MessSpectrumDriver(fsgc) elif driver == "mame-fs": return MessFsSpectrumDriver(fsgc)
def driver(self, fsgc): # if settings.get(Option.NES_DRIVER) == "mess": # return MessNesDriver(fsgc) # else: # return NintendoMednafenDriver(fsgc) driver = settings.get(Option.NES_EMULATOR) # FIXME: nestopia-libretro? retroarch-nestopia? if driver in ["retroarch-nestopia", "libretro-nestopia"]: return NintendoRetroArchDriver(fsgc) elif driver in ["mame", "mess"]: return MessNesDriver(fsgc) elif driver == "higan": return NintendoHiganDriver(fsgc) return NintendoMednafenDriver(fsgc)
def driver(self, fsgc): driver = settings.get(Option.N64_EMULATOR) if not driver: driver = "mupen64plus_next" if driver == "mupen64plus": return Nintendo64MupenDriver(fsgc) elif driver == "retroarch/mupen64plus_next": return Nintendo64RetroArchDriver(fsgc, core="mupen64plus_next", name="RetroArch/Mupen64PlusNext") elif driver == "retroarch/parallel_n64": return Nintendo64RetroArchDriver(fsgc, core="parallel_n64", name="RetroArch/Mupen64PlusNext") raise Exception("Unknkown N64 driver")
def override_config(config: DefaultDict[str, str]): if should_disable_drive_click(): config[Option.FLOPPY_DRIVE_VOLUME_EMPTY] = "0" model = settings.get(Option.WHDLOAD_MODEL) if model: if model == "A1200": config[Option.AMIGA_MODEL] = "A1200" elif model == "A1200/NONCE": # The following slaves do not work with A1200 non-cycle-exact # (non-exhaustive list, only some random tests): # - Cyber World config[Option.AMIGA_MODEL] = "A1200" config[Option.ACCURACY] = "0" config[Option.CHIP_MEMORY] = "" config[Option.SLOW_MEMORY] = "" config[Option.FAST_MEMORY] = "8192"
def driver(self, fsgc): emulator = settings.get(Option.SMD_EMULATOR) if emulator in ["retroarch-fs", "retroarch-fs/genesisplusgx"]: return MegaDriveRetroArchDriver(fsgc) if emulator in ["mame-fs"]: return MegaDriveMameDriver(fsgc) # FIXME: Vanilla retroarch not supported yet if emulator in ["retroarch", "retroarch/genesisplusgx"]: return MegaDriveRetroArchDriver(fsgc) # Deprecated name if emulator in ["retroarch-genesis-plus-gx"]: return MegaDriveRetroArchDriver(fsgc) # Legacy names if emulator in ["mame", "mess"]: return MegaDriveMameDriver(fsgc) return MegaDriveMednafenDriver(fsgc)
def driver(self, fsgc): driver = settings.get(Option.SNES_EMULATOR) if not driver: driver = "mednafen-fs" if driver == "mame": return MameSnesDriver(fsgc) elif driver == "mame-fs": return MameFsSnesDriver(fsgc) elif driver == "mednafen": return MednafenSnesDriver(fsgc) elif driver == "mednafen-fs": return MednafenFsSnesDriver(fsgc) elif driver == "retroarch": return RetroArchBsnesDriver(fsgc, "bsnes") elif driver == "retroarch/bsnes": return RetroArchBsnesDriver(fsgc, "bsnes") elif driver == "retroarch/bsnes2014_accuracy": return RetroArchBsnesDriver(fsgc, "bsnes2014_accuracy") raise Exception("Unknown SNES driver")
def driver(self, fsgc): emulator = settings.get(Option.SMD_EMULATOR) if emulator in ["retroarch-fs", "retroarch-fs/genesisplusgx"]: return MegaDriveRetroArchDriver(fsgc) if emulator in ["mame-fs"]: return MegaDriveMameDriver(fsgc) if emulator in ["mednafen"]: return MegaDriveMednafenDriver(fsgc) # FIXME: Vanilla retroarch not supported yet if emulator in ["retroarch", "retroarch/genesisplusgx"]: return MegaDriveRetroArchDriver(fsgc) # Deprecated name if emulator in ["retroarch-genesis-plus-gx"]: return MegaDriveRetroArchDriver(fsgc) # Legacy names if emulator in ["mame", "mess"]: return MegaDriveMameDriver(fsgc) return MegaDriveMednafenFSDriver(fsgc)
def driver(fsgc): driver = settings.get(Option.NES_EMULATOR) if not driver: driver = "mednafen" # if driver == "higan": # return HiganNesDriver(fsgc) if driver == "fs-mednafen": return MednafenFsNesDriver(fsgc) elif driver == "mame": return MameNesDriver(fsgc) elif driver == "mame-fs": return MameFsNesDriver(fsgc) elif driver == "mednafen": return MednafenNesDriver(fsgc) elif driver == "retroarch": return RetroArchMesenDriver(fsgc) elif driver == "retroarch/mesen": return RetroArchMesenDriver(fsgc) elif driver == "retroarch/nestopia": return RetroArchNestopiaDriver(fsgc) return None
def __init__(self, parent, index=0): PagedDialog.__init__( self, parent, "{} - {} Launcher".format(gettext("Settings"), fsgs.product), ) # FIXME: remove this once the dialog uses Window as base class # self.setAttribute(Qt.WA_DeleteOnClose, True) # self.add_page( # # gettext("Appearance"), LanguageSettingsPage, # gettext("Language"), LanguageSettingsPage, # fsui.Icon("language-settings", "pkg:workspace")) self.add_page( gettext("Common"), LanguageSettingsPage, fsui.Icon("language-settings", "pkg:workspace"), bold=True, ) self.add_page( gettext("Controllers"), JoystickSettingsPage, fsui.Icon("gamepad", "pkg:workspace"), ) self.add_page( gettext("Plugins"), PluginsSettingsPage, fsui.Icon("settings", "pkg:workspace"), ) self.add_page( gettext("Directories"), DirectoriesSettingsPage, fsui.Icon("folder", "pkg:launcher"), ) self.add_page( gettext("Advanced"), AdvancedSettingsPage, fsui.Icon("settings", "pkg:workspace"), ) self.add_page( "FS-UAE", FSUAESettingsPage, fsui.Icon("fs-uae", "pkg:launcher"), bold=True, ) self.add_page( gettext("Keyboard"), KeyboardSettingsPage, fsui.Icon("keyboard-settings", "pkg:workspace"), ) self.add_page( gettext("Mouse"), MouseSettingsPage, fsui.Icon("mouse-settings", "pkg:workspace"), ) self.add_page( gettext("Audio"), AudioSettingsPage, fsui.Icon("audio-settings", "pkg:workspace"), ) self.add_page( gettext("Video"), VideoSettingsPage, fsui.Icon("video-settings", "pkg:workspace"), ) self.add_page( gettext("Advanced Video"), AdvancedVideoSettingsPage, fsui.Icon("video-settings", "pkg:workspace"), ) # self.add_page( # gettext("Synchronization"), VideoSyncSettingsPage, # fsui.Icon("video-settings", "pkg:workspace")) # self.add_page( # gettext("Filters & Scaling"), FilterSettingsPage, # fsui.Icon("video-settings", "pkg:workspace")) # self.add_page(gettext("OpenGL Settings"), OpenGLSettingsPage) # if Settings.get("database_feature") == "1": # self.add_page( # gettext("Logging"), LoggingSettingsPage, # fsui.Icon("settings", "pkg:workspace")) self.add_page( "{} Launcher".format(fsgs.product), LauncherSettingsPage, fsui.Icon("fs-uae-launcher", "pkg:launcher"), bold=True, ) self.add_page( gettext("File Database"), ScanSettingsPage, fsui.Icon("indexing-settings", "pkg:workspace"), ) self.add_page( gettext("Game Database"), GameDatabaseSettingsPage, fsui.Icon("database-settings", "pkg:workspace"), ) if fsgs.openretro or settings.get(Option.PLATFORMS_FEATURE) == "1": self.add_page( gettext("Game Platforms"), GamePlatformsSettingsPage, fsui.Icon("database-settings", "pkg:workspace"), ) # self.add_page(gettext("Custom Settings"), CustomSettingsPage) if LauncherSettings.get(Option.NETPLAY_FEATURE) != "0": self.add_page( gettext("Net Play"), NetplaySettingsPage, fsui.Icon("netplay-settings", "pkg:workspace"), ) self.add_page( "WHDLoad", WHDLoadSettingsPage, fsui.Icon("hd", "pkg:launcher") ) # self.add_page( # gettext("Experimental Features"), ExperimentalFeaturesPage, # fsui.Icon("settings", "pkg:workspace")) # self.add_page( # gettext("Maintenance"), MaintenanceSettingsPage, # fsui.Icon("maintenance", "pkg:workspace")) self.add_page( "{} Arcade".format(fsgs.product), ArcadeSettingsPage, fsui.Icon("fs-uae-arcade", "pkg:launcher"), bold=True, ) # Old texts # gettext("Video Synchronization") # gettext("Synchronization") gettext("Advanced") last_index = self.get_page_index_by_title( LauncherSettings.get("last_settings_page") ) index = last_index or index self.list_view.set_index(index) defaults_button = fsui.Button(self, gettext("Reset to Defaults")) defaults_button.activated.connect(self.__defaults_activated) self.button_layout.insert(0, defaults_button, fill=True) defaults_label = fsui.Label( self, gettext("Choices marked with (*) is the default setting") ) self.button_layout.insert(1, defaults_label, margin_left=20) self.set_size((940, 560)) # self.center_on_parent() self.closed.connect(self.__closed) self.page_changed.connect(self.__page_changed)
def driver(self, fsgc): driver = settings.get(Option.NDS_EMULATOR) if driver == "desmume": return DesmumeDriver(fsgc) return MelonDSDriver(fsgc)
def driver(self, fsgc): if settings.get(Option.SMS_DRIVER) == "mess": return MessSmsDriver(fsgc) else: return MasterSystemMednafenFSDriver(fsgc)
def __init__(self, context): ContextAware.__init__(self, context) self.values = {} self.log_config = settings.get(Option.LAUNCHER_LOG_CONFIG) == "1"
def __init__(self, parent, with_more_button=True): unused(with_more_button) fsui.Group.__init__(self, parent) self.layout = fsui.VerticalLayout() self.model_ids = [x["id"] for x in Amiga.models if "/" not in x["id"]] self.model_titles = [ x["title"] for x in Amiga.models if "/" not in x["id"] ] self.sub_model_ids = [] self.sub_model_titles = [] self.sub_model_updating = False self.model_choice = fsui.Choice(self, self.model_titles) # AmigaEnableBehavior(self.model_choice) self.sub_model_choice = fsui.Choice(self, self.sub_model_titles) # AmigaEnableBehavior(self.sub_model_choice) self.accuracy_label = fsui.Label(self, gettext("Accuracy:")) self.accuracy_choice = fsui.Choice( self, [gettext("High"), gettext("Medium"), gettext("Low")]) # AmigaEnableBehavior(self.accuracy_choice) self.ntsc_checkbox = ConfigCheckBox(self, "NTSC", Option.NTSC_MODE) AmigaShowBehavior(self.accuracy_label) AmigaShowBehavior(self.accuracy_choice) AmigaShowBehavior(self.ntsc_checkbox) # if fs_uae_launcher.ui.get_screen_size()[1] > 768: # self.layout.add(heading_label, margin=10) # self.layout.add_spacer(0) self.model_title_layout = fsui.HorizontalLayout() self.layout.add(self.model_title_layout, fill=True) if openretro or settings.get(Option.PLATFORMS_FEATURE) == "1": heading_label = fsui.HeadingLabel(self, gettext("Platform & Model")) self.model_title_layout.add(heading_label, margin=10) # platform_group = ConfigWidgetFactory( # check=False, label=False).create(self, Option.PLATFORM) # self.model_title_layout.add(platform_group, margin_left=20) # Adding label to get the vertical spacing correct. # heading_label = fsui.HeadingLabel(self, "") # self.model_title_layout.add(heading_label, margin=10) else: heading_label = fsui.HeadingLabel(self, gettext("Amiga Model")) self.model_title_layout.add(heading_label, margin=10) self.model_title_layout.add_spacer(0, expand=True) self.model_title_layout.add(self.ntsc_checkbox, expand=False, margin_left=10, margin_right=10) self.model_title_layout.add_spacer(20) self.model_title_layout.add(self.accuracy_label, margin_right=10) self.model_title_layout.add(self.accuracy_choice, margin_right=10) self.model_title_layout.add(CustomConfigButton(self), margin_right=10) self.model_layout = fsui.HorizontalLayout() def dummy_min_width(): return 0 # Not sure why this is needed, but on startup, the min width # seems to be set too large due to something in the model layout. self.model_layout.get_min_width = dummy_min_width self.layout.add(self.model_layout, fill=True) if openretro or settings.get(Option.PLATFORMS_FEATURE) == "1": platform_group = ConfigWidgetFactory(check=False, label=False).create( self, Option.PLATFORM) self.model_layout.add(platform_group, margin=10) pass self.other_model_choice = ModelChoice(self) self.model_layout.add(self.other_model_choice, expand=True, margin=10) self.model_layout.add(self.model_choice, expand=False, margin=10) AmigaShowBehavior(self.model_choice) self.model_layout.add(self.sub_model_choice, expand=True, margin=10) AmigaShowBehavior(self.sub_model_choice) ConfigBehavior(self, [Option.ACCURACY, Option.AMIGA_MODEL, Option.PLATFORM]) self.model_choice.on_changed = self.on_model_changed self.sub_model_choice.on_changed = self.on_sub_model_changed self.accuracy_choice.on_changed = self.on_accuracy_changed
def __init__(self, parent, index=0): PagedDialog.__init__( self, parent, "{} - {} Launcher".format(gettext("Settings"), fsgs.product)) # FIXME: remove this once the dialog uses Window as base class # self.setAttribute(Qt.WA_DeleteOnClose, True) # self.add_page( # # gettext("Appearance"), LanguageSettingsPage, # gettext("Language"), LanguageSettingsPage, # fsui.Icon("language-settings", "pkg:workspace")) self.add_page(gettext("Common"), LanguageSettingsPage, fsui.Icon("language-settings", "pkg:workspace"), bold=True) self.add_page(gettext("Controllers"), JoystickSettingsPage, fsui.Icon("gamepad", "pkg:workspace")) self.add_page(gettext("Plugins"), PluginsSettingsPage, fsui.Icon("settings", "pkg:workspace")) self.add_page(gettext("Directories"), DirectoriesSettingsPage, fsui.Icon("folder", "pkg:launcher")) self.add_page(gettext("Advanced"), AdvancedSettingsPage, fsui.Icon("settings", "pkg:workspace")) self.add_page("FS-UAE", FSUAESettingsPage, fsui.Icon("fs-uae", "pkg:launcher"), bold=True) self.add_page(gettext("Keyboard"), KeyboardSettingsPage, fsui.Icon("keyboard-settings", "pkg:workspace")) self.add_page(gettext("Mouse"), MouseSettingsPage, fsui.Icon("mouse-settings", "pkg:workspace")) self.add_page(gettext("Audio"), AudioSettingsPage, fsui.Icon("audio-settings", "pkg:workspace")) self.add_page(gettext("Video"), VideoSettingsPage, fsui.Icon("video-settings", "pkg:workspace")) self.add_page(gettext("Advanced Video"), AdvancedVideoSettingsPage, fsui.Icon("video-settings", "pkg:workspace")) # self.add_page( # gettext("Synchronization"), VideoSyncSettingsPage, # fsui.Icon("video-settings", "pkg:workspace")) # self.add_page( # gettext("Filters & Scaling"), FilterSettingsPage, # fsui.Icon("video-settings", "pkg:workspace")) # self.add_page(gettext("OpenGL Settings"), OpenGLSettingsPage) # if Settings.get("database_feature") == "1": # self.add_page( # gettext("Logging"), LoggingSettingsPage, # fsui.Icon("settings", "pkg:workspace")) self.add_page("{} Launcher".format(fsgs.product), LauncherSettingsPage, fsui.Icon("fs-uae-launcher", "pkg:launcher"), bold=True) self.add_page(gettext("File Database"), ScanSettingsPage, fsui.Icon("indexing-settings", "pkg:workspace")) self.add_page(gettext("Game Database"), GameDatabaseSettingsPage, fsui.Icon("database-settings", "pkg:workspace")) if fsgs.openretro or settings.get(Option.PLATFORMS_FEATURE) == "1": self.add_page(gettext("Game Platforms"), GamePlatformsSettingsPage, fsui.Icon("database-settings", "pkg:workspace")) # self.add_page(gettext("Custom Settings"), CustomSettingsPage) if LauncherSettings.get(Option.NETPLAY_FEATURE) != "0": self.add_page(gettext("Net Play"), NetplaySettingsPage, fsui.Icon("netplay-settings", "pkg:workspace")) self.add_page("WHDLoad", WHDLoadSettingsPage, fsui.Icon("hd", "pkg:launcher")) # self.add_page( # gettext("Experimental Features"), ExperimentalFeaturesPage, # fsui.Icon("settings", "pkg:workspace")) # self.add_page( # gettext("Maintenance"), MaintenanceSettingsPage, # fsui.Icon("maintenance", "pkg:workspace")) self.add_page("{} Arcade".format(fsgs.product), ArcadeSettingsPage, fsui.Icon("fs-uae-arcade", "pkg:launcher"), bold=True) # Old texts # gettext("Video Synchronization") # gettext("Synchronization") gettext("Advanced") last_index = self.get_page_index_by_title( LauncherSettings.get("last_settings_page")) index = last_index or index self.list_view.set_index(index) defaults_button = fsui.Button(self, gettext("Reset to Defaults")) defaults_button.activated.connect(self.__defaults_activated) self.button_layout.insert(0, defaults_button, fill=True) defaults_label = fsui.Label( self, gettext("Choices marked with (*) is the default setting")) self.button_layout.insert(1, defaults_label, margin_left=20) self.set_size((940, 560)) # self.center_on_parent() self.closed.connect(self.__closed) self.page_changed.connect(self.__page_changed)
def __init__(self, parent, with_more_button=True): unused(with_more_button) fsui.Group.__init__(self, parent) self.layout = fsui.VerticalLayout() self.model_ids = [x["id"] for x in Amiga.models if "/" not in x["id"]] self.model_titles = [ x["title"] for x in Amiga.models if "/" not in x["id"] ] self.sub_model_ids = [] self.sub_model_titles = [] self.sub_model_updating = False self.model_choice = fsui.Choice(self, self.model_titles) # AmigaEnableBehavior(self.model_choice) self.sub_model_choice = fsui.Choice(self, self.sub_model_titles) # AmigaEnableBehavior(self.sub_model_choice) self.accuracy_label = fsui.Label(self, gettext("Accuracy:")) self.accuracy_choice = fsui.Choice( self, [gettext("High"), gettext("Medium"), gettext("Low")] ) # AmigaEnableBehavior(self.accuracy_choice) self.ntsc_checkbox = ConfigCheckBox(self, "NTSC", Option.NTSC_MODE) AmigaShowBehavior(self.accuracy_label) AmigaShowBehavior(self.accuracy_choice) AmigaShowBehavior(self.ntsc_checkbox) # if fs_uae_launcher.ui.get_screen_size()[1] > 768: # self.layout.add(heading_label, margin=10) # self.layout.add_spacer(0) self.model_title_layout = fsui.HorizontalLayout() self.layout.add(self.model_title_layout, fill=True) if openretro or settings.get(Option.PLATFORMS_FEATURE) == "1": heading_label = fsui.HeadingLabel( self, gettext("Platform & Model") ) self.model_title_layout.add(heading_label, margin=10) # platform_group = ConfigWidgetFactory( # check=False, label=False).create(self, Option.PLATFORM) # self.model_title_layout.add(platform_group, margin_left=20) # Adding label to get the vertical spacing correct. # heading_label = fsui.HeadingLabel(self, "") # self.model_title_layout.add(heading_label, margin=10) else: heading_label = fsui.HeadingLabel(self, gettext("Amiga Model")) self.model_title_layout.add(heading_label, margin=10) self.model_title_layout.add_spacer(0, expand=True) self.model_title_layout.add( self.ntsc_checkbox, expand=False, margin_left=10, margin_right=10 ) self.model_title_layout.add_spacer(20) self.model_title_layout.add(self.accuracy_label, margin_right=10) self.model_title_layout.add(self.accuracy_choice, margin_right=10) self.model_title_layout.add(CustomConfigButton(self), margin_right=10) self.model_layout = fsui.HorizontalLayout() def dummy_min_width(): return 0 # Not sure why this is needed, but on startup, the min width # seems to be set too large due to something in the model layout. self.model_layout.get_min_width = dummy_min_width self.layout.add(self.model_layout, fill=True) if openretro or settings.get(Option.PLATFORMS_FEATURE) == "1": platform_group = ConfigWidgetFactory( check=False, label=False ).create(self, Option.PLATFORM) self.model_layout.add(platform_group, margin=10) pass self.other_model_choice = ModelChoice(self) self.model_layout.add(self.other_model_choice, expand=True, margin=10) self.model_layout.add(self.model_choice, expand=False, margin=10) AmigaShowBehavior(self.model_choice) self.model_layout.add(self.sub_model_choice, expand=True, margin=10) AmigaShowBehavior(self.sub_model_choice) ConfigBehavior( self, [Option.ACCURACY, Option.AMIGA_MODEL, Option.PLATFORM] ) self.model_choice.on_changed = self.on_model_changed self.sub_model_choice.on_changed = self.on_sub_model_changed self.accuracy_choice.on_changed = self.on_accuracy_changed
def get_runner(self, fsgs): if settings.get(Option.ZXS_DRIVER) == "mess": return MessSpectrumDriver(fsgs) else: return FuseSpectrumDriver(fsgs)
def __init__(self, context): ContextAware.__init__(self, context) self.values = {} self.log_config = settings.get(Option.LAUNCHER_LOG_CONFIG) == "1"
def search(self): if "--disable-search" in sys.argv: return False return settings.get(Option.ARCADE_SEARCH) != "0"
def shutdown_command(self): return settings.get(Option.ARCADE_SHUTDOWN)
def __init__(self, parent): super().__init__(parent) icon = fsui.Icon("database-settings", "pkg:workspace") title = gettext("Game Platforms") subtitle = "" self.add_header(icon, title, subtitle) self.hori_layout = None self.hori_counter = 0 if openretro or settings.get(Option.PLATFORMS_FEATURE) == "1": # self.add_section(gettext("Game Databases")) label = fsui.MultiLineLabel( self, gettext( "Note: This is an experimental feature. " "Additional plugins are needed." ), 640, ) self.layout.add(label, margin_top=20, margin_bottom=20) self.add_database_option( Platform.CPC, Option.CPC_DATABASE, "Amstrad CPC" ) self.add_database_option( Platform.ARCADE, Option.ARCADE_DATABASE, "Arcade" ) self.add_database_option( Platform.A7800, Option.A7800_DATABASE, "Atari 7800" ) self.add_database_option( Platform.ATARI, Option.ATARI_DATABASE, "Atari ST" ) self.add_database_option( Platform.C64, Option.C64_DATABASE, "Commodore 64" ) self.add_database_option(Platform.DOS, Option.DOS_DATABASE, "DOS") self.add_database_option( Platform.GB, Option.GB_DATABASE, "Game Boy" ) self.add_database_option( Platform.GBA, Option.GBA_DATABASE, "Game Boy Advance" ) self.add_database_option( Platform.GBC, Option.GBC_DATABASE, "Game Boy Color" ) self.add_database_option( Platform.SMS, Option.SMS_DATABASE, "Master System" ) self.add_database_option( Platform.SMD, Option.SMD_DATABASE, "Mega Drive" ) self.add_database_option( Platform.NEOGEO, Option.NEOGEO_DATABASE, "Neo-Geo" ) self.add_database_option( Platform.NES, Option.NES_DATABASE, "Nintendo" ) self.add_database_option( Platform.PSX, Option.PSX_DATABASE, "PlayStation" ) self.add_database_option( Platform.SNES, Option.SNES_DATABASE, "Super Nintendo" ) self.add_database_option( Platform.TG16, Option.TG16_DATABASE, "TurboGrafx-16" ) self.add_database_option( Platform.TGCD, Option.TGCD_DATABASE, "TurboGrafx-CD" ) self.add_database_option( Platform.ZXS, Option.ZXS_DATABASE, "ZX Spectrum" )
def get_runner(self, fsgs): if settings.get(Option.ZXS_DRIVER) == "mess": return MessSpectrumDriver(fsgs) else: return FuseSpectrumDriver(fsgs)
def get_runner(self, fsgs): if settings.get(Option.SMS_DRIVER) == "mess": return MessSmsDriver(fsgs) else: return MednafenSMSDriver(fsgs)
def search(self): if "--disable-search" in sys.argv: return False return settings.get(Option.ARCADE_SEARCH) != "0"
def shutdown_command(self): return settings.get(Option.ARCADE_SHUTDOWN)
def __init__(self): self.theme = settings.get(Option.ARCADE_THEME) if not self.theme: self.theme = "blue"