summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--default.cfg5
-rw-r--r--nuklear_ui/blastem_nuklear.c10
2 files changed, 15 insertions, 0 deletions
diff --git a/default.cfg b/default.cfg
index e09e747..3fc95b3 100644
--- a/default.cfg
+++ b/default.cfg
@@ -228,6 +228,11 @@ ui {
}
system {
+ #controls how the emulated system is synced to the host
+ #video provides the smoothest experience when the host and emulated system have similar refresh rates
+ #audio provides lower audio latency, especially when there is a refresh rate mismatch
+ sync_source video
+ #set this to random to debug initialization bugs
ram_init zero
default_region U
#controls whether MegaWiFi support is enabled or not
diff --git a/nuklear_ui/blastem_nuklear.c b/nuklear_ui/blastem_nuklear.c
index 03b666b..44986c9 100644
--- a/nuklear_ui/blastem_nuklear.c
+++ b/nuklear_ui/blastem_nuklear.c
@@ -776,6 +776,15 @@ void view_audio_settings(struct nk_context *context)
}
void view_system_settings(struct nk_context *context)
{
+ const char *sync_opts[] = {
+ "video",
+ "audio"
+ };
+ const uint32_t num_sync_opts = sizeof(sync_opts)/sizeof(*sync_opts);
+ static int32_t selected_sync = -1;
+ if (selected_sync < 0) {
+ selected_sync = find_match(sync_opts, num_sync_opts, "system\0sync_source\0", "video");
+ }
const char *regions[] = {
"J - Japan",
"U - Americas",
@@ -833,6 +842,7 @@ void view_system_settings(struct nk_context *context)
uint32_t height = render_height();
if (nk_begin(context, "System Settings", nk_rect(0, 0, width, height), 0)) {
nk_layout_row_static(context, 30, width > 300 ? 300 : width, 2);
+ selected_sync = settings_dropdown(context, "Sync Source", sync_opts, num_sync_opts, selected_sync, "system\0sync_source\0");
settings_int_property(context, "68000 Clock Divider", "", "clocks\0m68k_divider\0", 7, 1, 53);
settings_toggle(context, "Remember ROM Path", "ui\0remember_path\0", 1);
selected_region = settings_dropdown_ex(context, "Default Region", region_codes, regions, num_regions, selected_region, "system\0default_region\0");