Skip to content

Instantly share code, notes, and snippets.

@vext01
Created December 2, 2012 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vext01/4190613 to your computer and use it in GitHub Desktop.
Save vext01/4190613 to your computer and use it in GitHub Desktop.
--- fs_uae_launcher/Config.py.orig Sun Dec 2 19:37:18 2012
+++ fs_uae_launcher/Config.py Sun Dec 2 19:35:42 2012
@@ -27,6 +27,7 @@
("amiga_model", "A500", "checksum", "sync"),
("ntsc_mode", "", "checksum", "sync"),
("accuracy", "", "checksum", "sync"),
+ ("video_sync", "", "checksum", "sync"),
("chip_memory", "", "checksum", "sync"),
("slow_memory", "", "checksum", "sync"),
("fast_memory", "", "checksum", "sync"),
--- ./fs_uae_launcher/ui/config/ModelGroup.py.orig Sun Dec 2 19:06:38 2012
+++ ./fs_uae_launcher/ui/config/ModelGroup.py Sun Dec 2 19:33:14 2012
@@ -35,6 +35,7 @@
self.accuracy_choice = fsui.Choice(self, ACCURACY_LEVELS)
#self.ntsc_checkbox = fsui.CheckBox(self, "NTSC")
self.ntsc_checkbox = ConfigCheckBox(self, "NTSC", "ntsc_mode")
+ self.vsync_checkbox = ConfigCheckBox(self, "Video Sync", "video_sync")
self.layout.add(heading_label, margin=10)
self.layout.add_spacer(0)
@@ -42,8 +43,13 @@
self.layout.add(hori_layout, fill=True)
hori_layout.add(self.model_choice, expand=True, margin=10)
hori_layout.add(self.accuracy_choice, expand=False, margin=10)
- hori_layout.add(self.ntsc_checkbox, expand=False, margin=10)
+ # checkboxes in rows of three
+ check_hori_layout = fsui.HorizontalLayout()
+ check_hori_layout.add(self.ntsc_checkbox, expand=False, margin=10)
+ check_hori_layout.add(self.vsync_checkbox, expand=False, margin=10)
+ self.layout.add(check_hori_layout)
+
# FIXME: should not need to call from here...
#Config.update_kickstart()
@@ -54,11 +60,13 @@
self.on_config("amiga_model", Config.get("amiga_model"))
self.on_config("accuracy", Config.get("accuracy"))
#self.on_config("ntsc", Config.get("ntsc"))
+ self.on_config("video_sync", Config.get("video_sync"))
def set_config_handlers(self):
self.model_choice.on_change = self.on_model_change
self.accuracy_choice.on_change = self.on_accuracy_change
#self.ntsc_checkbox.on_change = self.on_ntsc_change
+ self.vsync_checkbox.on_change = self.on_vsync_change
Config.add_listener(self)
def on_destroy(self):
@@ -94,6 +102,12 @@
# else:
# Config.set("ntsc_mode", "")
+ def on_vsync_change(self):
+ if self.vsync_checkbox.is_checked():
+ Config.set("video_sync", "1")
+ else:
+ Config.set("video_sync", "")
+
def on_config(self, key, value):
if key == "amiga_model":
for i, config in enumerate(Amiga.models_config):
@@ -113,6 +127,12 @@
# self.ntsc_checkbox.check(True)
# else:
# self.ntsc_checkbox.check(False)
+ elif key == "video_sync":
+ print("VIDEO SYNC::::::: '%s'" % value)
+ if value == "on":
+ self.vsync_checkbox.check(True)
+ else:
+ self.vsync_checkbox.check(False)
def on_hds_button(self):
dialog = ConfigDialog(self.get_window(), ConfigDialog.HARD_DRIVES)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment