Mercurial > repos > blastem
changeset 2623:07faf0f5466f
Add option to force use of the default region
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 22 Feb 2025 19:52:50 -0800 |
parents | adff015dc94f |
children | 6bd492b8172e |
files | default.cfg genesis.c nuklear_ui/blastem_nuklear.c |
diffstat | 3 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/default.cfg Sat Feb 22 19:29:18 2025 -0800 +++ b/default.cfg Sat Feb 22 19:52:50 2025 -0800 @@ -418,7 +418,11 @@ sync_source audio #set this to random to debug initialization bugs ram_init zero + #Default region to use when the ROM has no region info or there are multiple options + #U = USA/North America, E = Europe, J = Japan default_region U + #Whether to always force the region selected in default_region + force_region off #controls whether MegaWiFi support is enabled or not #MegaWiFi allows ROMs to make connections to the internet #so it should only be enabled for ROMs you trust
--- a/genesis.c Sat Feb 22 19:29:18 2025 -0800 +++ b/genesis.c Sat Feb 22 19:52:50 2025 -0800 @@ -1920,7 +1920,9 @@ { if (!region) { char * def_region = tern_find_path_default(config, "system\0default_region\0", (tern_val){.ptrval = "U"}, TVAL_PTR).ptrval; - if (!info->regions || (info->regions & translate_region_char(toupper(*def_region)))) { + char * force_region = tern_find_path_default(config, "system\0force_region\0", (tern_val){.ptrval = "off"}, TVAL_PTR).ptrval; + + if (!info->regions || (info->regions & translate_region_char(toupper(*def_region))) || !strcmp(force_region, "on")) { region = translate_region_char(toupper(*def_region)); } else { region = info->regions;
--- a/nuklear_ui/blastem_nuklear.c Sat Feb 22 19:29:18 2025 -0800 +++ b/nuklear_ui/blastem_nuklear.c Sat Feb 22 19:52:50 2025 -0800 @@ -2458,6 +2458,7 @@ config = tern_insert_path(config, config_path1, (tern_val){.ptrval = strdup(io_opts_1[selected_io_1])}, TVAL_PTR); } selected_region = settings_dropdown_ex(context, "Default Region", region_codes, regions, num_regions, selected_region, "system\0default_region\0"); + settings_toggle(context, "Force Selected Region", "system\0force_region\0", 0); selected_sync = settings_dropdown(context, "Sync Source", sync_opts, num_sync_opts, selected_sync, "system\0sync_source\0"); if (!show_sms) { settings_int_property(context, "68000 Clock Divider", "", "clocks\0m68k_divider\0", 7, 1, 53);