mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-09 17:29:21 -10:00
settings: fold the remaining builder customizations into their rows
The rgui aspect lock's platform-shaped range ceiling and combobox hint become two row variants under the existing guard precedent; quit gains its command trigger in both its row forms, the plain action row upgraded to the EX grammar and the Lakka LV row's cmd slot filled; window decorations grows an OSX variant pair so the reinit trigger lives in the row everywhere it applies. Twelve more builder lines gone; the intl consumer's prelude learns the action EX shape for the one file that now uses it. Referee after this: 528 of 941 byte-faithful from the index, zero action, command and flag mismatches except a single residue - the fullscreen widget scale row is LV grammar, which has no range or handler slots yet, so its customization stays in the builder with the reason written beside it. The settings dump is byte-identical throughout: every fold moved values, not behavior. One honest revert inside: an earlier edit had upgraded the console variant of the widget row, which would have changed console behavior no gate here covers; it is restored to upstream shape.
This commit is contained in:
1 parent
2a3372b700
commit
fb4a17e562
6 files changed
+46
-15
No files matched your search
+5
-1
@@ -927,7 +927,6 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_##T, us)
|
||||
#undef S_FLOAT_EX_NS
|
||||
#undef S_FLOAT_EX_H
|
||||
#undef S_FLOAT_EX_NS_H
|
||||
#undef S_ACTION_EX
|
||||
#undef S_ACTION_EX_NS
|
||||
#undef S_ACTION_EX_H
|
||||
#undef S_ACTION_EX_NS_H
|
||||
@@ -1003,6 +1002,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_##T, us) \
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_##T, sub)
|
||||
#define S_PATH_DS_NS(f, T, n, df2, sd, c, vals, rp, ui, us) \
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_##T, us)
|
||||
#define S_ACTION_EX(T, n, sd, ok, rp, c, us, sub) \
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_##T, us) \
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_##T, sub)
|
||||
#define S_ACTION(T, n, us, sub) \
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_##T, us) \
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_##T, sub)
|
||||
@@ -1027,6 +1029,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_##T, us)
|
||||
#undef S_PATH_NS
|
||||
#undef S_PATH_DS
|
||||
#undef S_PATH_DS_NS
|
||||
#undef S_ACTION_EX
|
||||
#undef S_ACTION_EX
|
||||
#undef S_ACTION
|
||||
#undef S_ACTION_NS
|
||||
#undef SETTINGS_DEF_STRINGS_PASS
|
||||
|
||||
+13
-11
@@ -12677,7 +12677,6 @@ static void settings_build_main_menu(
|
||||
#else
|
||||
ADD_DESC(mm_desc_9);
|
||||
#endif
|
||||
MENU_SETTINGS_LIST_CURRENT_ADD_CMD(list, list_info, CMD_EVENT_QUIT);
|
||||
#endif
|
||||
|
||||
ADD_DESC(mm_desc_10);
|
||||
@@ -14249,9 +14248,6 @@ static void settings_build_video(
|
||||
ADD_DESC(winscale_desc);
|
||||
|
||||
ADD_DESC(vid_desc_14);
|
||||
#ifndef OSX
|
||||
MENU_SETTINGS_LIST_CURRENT_ADD_CMD(list, list_info, CMD_EVENT_REINIT);
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
ADD_DESC(vid_desc_15);
|
||||
@@ -15088,9 +15084,12 @@ static void settings_build_onscreen_notifications(
|
||||
ADD_DESC(osn_desc_1);
|
||||
#else
|
||||
ADD_DESC(widget_fs_desc);
|
||||
#endif
|
||||
/* The fullscreen variant is an LV row and the LV float grammar
|
||||
* has no range or handler slots yet; until it grows them, the
|
||||
* customization stays here. The windowed row carries its own. */
|
||||
SETTINGS_ACTION_SET(ok, &(*list)[list_info->index - 1], &setting_action_ok_uint)
|
||||
menu_settings_list_current_add_range(list, list_info, 0.2, 5.0, 0.01, true, true);
|
||||
#endif
|
||||
|
||||
#if !(defined(RARCH_CONSOLE) || defined(RARCH_MOBILE))
|
||||
ADD_DESC(osn_desc_2);
|
||||
@@ -15494,12 +15493,6 @@ static void settings_build_menu(
|
||||
|
||||
#if !defined(DINGUX)
|
||||
ADD_DESC(menu_desc_8);
|
||||
#if defined(GEKKO)
|
||||
menu_settings_list_current_add_range(list, list_info, 0, RGUI_ASPECT_RATIO_LOCK_LAST-3, 1, true, true);
|
||||
#else
|
||||
menu_settings_list_current_add_range(list, list_info, 0, RGUI_ASPECT_RATIO_LOCK_LAST-1, 1, true, true);
|
||||
#endif
|
||||
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_UINT_COMBOBOX;
|
||||
#endif
|
||||
|
||||
ADD_DESC(menu_desc_9);
|
||||
@@ -18684,6 +18677,9 @@ rarch_setting_t *menu_setting_new(void)
|
||||
settings_t *settings = config_get_ptr();
|
||||
unsigned i2, n_checked = 0, n_nodesc = 0, n_ident = 0;
|
||||
unsigned n_nodesc_nonbind = 0;
|
||||
/* LV twins share one enum; only the first entry per enum is
|
||||
* reachable through find_enum, so only it is compared. */
|
||||
uint8_t *seen = (uint8_t*)calloc(MSG_LAST, 1);
|
||||
unsigned mm_act = 0, mm_name = 0, mm_tgt = 0, mm_def = 0;
|
||||
unsigned mm_rng = 0, mm_flag = 0, mm_other = 0;
|
||||
for (i2 = 0; list[i2].type != ST_NONE; i2++)
|
||||
@@ -18699,6 +18695,10 @@ rarch_setting_t *menu_setting_new(void)
|
||||
continue;
|
||||
if (e->enum_idx == MSG_UNKNOWN)
|
||||
continue;
|
||||
if (seen && seen[e->enum_idx])
|
||||
continue;
|
||||
if (seen)
|
||||
seen[e->enum_idx] = 1;
|
||||
n_checked++;
|
||||
if (!(d = settings_master_find(e->enum_idx)))
|
||||
{
|
||||
@@ -18779,6 +18779,8 @@ rarch_setting_t *menu_setting_new(void)
|
||||
menu_setting_free(sc);
|
||||
free(sc);
|
||||
}
|
||||
if (seen)
|
||||
free(seen);
|
||||
fprintf(stderr,
|
||||
"DESC_REFEREE checked=%u identical=%u no-desc=%u nonbind-nodesc=%u "
|
||||
"act=%u name=%u tgt=%u def=%u rng=%u flag=%u other=%u\n",
|
||||
|
||||
@@ -10,12 +10,16 @@
|
||||
#ifndef S_ACTION_H
|
||||
#define S_ACTION_H S_ACTION
|
||||
#endif
|
||||
#ifndef S_ACTION_EX_H
|
||||
#define S_ACTION_EX_H S_ACTION_EX
|
||||
#endif
|
||||
#endif
|
||||
/* Descriptor and configuration rows are #if !defined(IOS) #if !defined(HAVE_LAKKA); the string
|
||||
* tables always carry this row via the strings pass. */
|
||||
#if !defined(IOS) && !defined(HAVE_LAKKA) || defined(SETTINGS_DEF_STRINGS_PASS)
|
||||
S_ACTION_H(QUIT_RETROARCH,
|
||||
S_ACTION_EX_H(QUIT_RETROARCH,
|
||||
"quit_retroarch",
|
||||
SD_FLAG_NONE, NULL, NULL, CMD_EVENT_QUIT,
|
||||
"Quit",
|
||||
"Quit RetroArch application. Configuration save on exit is enabled.")
|
||||
#endif
|
||||
@@ -7,5 +7,5 @@
|
||||
/* Row referencing QUIT_RETROARCH; strings owned by another def file. */
|
||||
#if !defined(SETTINGS_DEF_STRINGS_PASS) && !defined(SETTINGS_DEF_CONFIG_PASS) && !defined(SETTINGS_DEF_ENUM_PASS)
|
||||
SDESC_ACTION_ROW_LV(QUIT_RETROARCH, RESTART_RETROARCH,
|
||||
SD_FLAG_NONE, NULL, NULL, 0)
|
||||
SD_FLAG_NONE, NULL, NULL, CMD_EVENT_QUIT)
|
||||
#endif
|
||||
@@ -16,9 +16,20 @@ S_UINT_EX(menu_rgui_aspect_ratio, MENU_RGUI_ASPECT_RATIO,
|
||||
/* Descriptor and configuration rows are #if !defined(DINGUX); the string
|
||||
* tables always carry this row via the strings pass. */
|
||||
#if !defined(DINGUX) || defined(SETTINGS_DEF_STRINGS_PASS)
|
||||
/* The range ceiling is platform-shaped: the Wii lacks the last two
|
||||
* lock modes. Two row variants keep the values in the row instead
|
||||
* of builder code; the combobox hint rides along. */
|
||||
#if defined(GEKKO) && !defined(SETTINGS_DEF_STRINGS_PASS)
|
||||
S_UINT_EX(menu_rgui_aspect_ratio_lock, MENU_RGUI_ASPECT_RATIO_LOCK,
|
||||
"rgui_aspect_ratio_lock",
|
||||
DEFAULT_RGUI_ASPECT_LOCK, SD_FLAG_NONE, 0, 0, 0, 0, 0, 0, setting_action_ok_uint, setting_get_string_representation_uint_rgui_aspect_ratio_lock, NULL, NULL, NULL, NULL, 0,
|
||||
DEFAULT_RGUI_ASPECT_LOCK, SD_FLAG_NONE, SDESC_RANGE_MINMAX, 0, 0, RGUI_ASPECT_RATIO_LOCK_LAST-3, 1, 0, setting_action_ok_uint, setting_get_string_representation_uint_rgui_aspect_ratio_lock, NULL, NULL, NULL, NULL, ST_UI_TYPE_UINT_COMBOBOX,
|
||||
"Lock Aspect Ratio",
|
||||
"Ensures that the menu is always displayed with the correct aspect ratio. If disabled, the quick menu will be stretched to match the currently loaded content.")
|
||||
#else
|
||||
S_UINT_EX(menu_rgui_aspect_ratio_lock, MENU_RGUI_ASPECT_RATIO_LOCK,
|
||||
"rgui_aspect_ratio_lock",
|
||||
DEFAULT_RGUI_ASPECT_LOCK, SD_FLAG_NONE, SDESC_RANGE_MINMAX, 0, 0, RGUI_ASPECT_RATIO_LOCK_LAST-1, 1, 0, setting_action_ok_uint, setting_get_string_representation_uint_rgui_aspect_ratio_lock, NULL, NULL, NULL, NULL, ST_UI_TYPE_UINT_COMBOBOX,
|
||||
"Lock Aspect Ratio",
|
||||
"Ensures that the menu is always displayed with the correct aspect ratio. If disabled, the quick menu will be stretched to match the currently loaded content.")
|
||||
#endif
|
||||
#endif
|
||||
@@ -4,8 +4,18 @@
|
||||
* matches SDESC_<kind>_ROW; row order is menu display order;
|
||||
* h2json.py parses these rows for the Crowdin source upload. */
|
||||
|
||||
/* Everywhere but macOS, toggling decorations needs a video reinit;
|
||||
* two row variants keep that in the row instead of builder code. */
|
||||
#if defined(OSX) && !defined(SETTINGS_DEF_STRINGS_PASS)
|
||||
S_BOOL(video_window_show_decorations, VIDEO_WINDOW_SHOW_DECORATIONS,
|
||||
"video_window_show_decorations",
|
||||
DEFAULT_WINDOW_DECORATIONS, SD_FLAG_NONE, 0, 0,
|
||||
"Show Window Decorations",
|
||||
"Show window title bar and borders.")
|
||||
#else
|
||||
S_BOOL(video_window_show_decorations, VIDEO_WINDOW_SHOW_DECORATIONS,
|
||||
"video_window_show_decorations",
|
||||
DEFAULT_WINDOW_DECORATIONS, SD_FLAG_NONE, 0, CMD_EVENT_REINIT,
|
||||
"Show Window Decorations",
|
||||
"Show window title bar and borders.")
|
||||
#endif
|
||||
Reference in new issue
Block a user