mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-23 18:49:37 -10:00
The console/mobile Graphics Widgets Scale Override row is a plain
S_FLOAT row, which has range and OK handler slots, but it left them
empty and relied on two builder lines after ADD_DESC to supply the
0.2-5.0 range and setting_action_ok_uint. That dependency is what
broke in fb4a17e562 (fixed in #19584): the builder lines moved into
the desktop branch and the console row was left with nothing.
Put the range and handler in the row itself, the same way the
windowed row already does, and move the two builder lines back into
the desktop branch where only the fullscreen LV row still needs them
(the LV float grammar has no range or handler slots). The comment
explaining that is restored.
No behavior change: SDESC_RANGE_MINMAX with 0.2/5.0/0.01 is the same
range, enforced at both ends, that add_range(..., true, true) applied,
and the handler is the same. Desktop rows are untouched.
20 lines
1.3 KiB
C
20 lines
1.3 KiB
C
/* Single-source definitions: widget scale setting.
|
|
* Grammar identical to settings_def_video_sync.h plus S_FLOAT and
|
|
* the _NS no-sublabel variants; the descriptor argument span
|
|
* matches SDESC_<kind>_ROW; row order is menu display order;
|
|
* h2json.py parses these rows for the Crowdin source upload. */
|
|
|
|
/* Descriptor rows are #ifdef HAVE_GFX_WIDGETS #if (defined(RARCH_CONSOLE) || defined(RARCH_MOBILE)); the string
|
|
* tables always carry this row via the strings pass. */
|
|
#if defined(HAVE_GFX_WIDGETS) && ((defined(RARCH_CONSOLE) || defined(RARCH_MOBILE))) || defined(SETTINGS_DEF_STRINGS_PASS) || defined(SETTINGS_DEF_CONFIG_PASS)
|
|
/* The configuration row lives under defined(HAVE_MENU); other passes are
|
|
* unaffected. */
|
|
#if !defined(SETTINGS_DEF_CONFIG_PASS) || (defined(HAVE_MENU))
|
|
S_FLOAT(menu_widget_scale_factor, MENU_WIDGET_SCALE_FACTOR,
|
|
"menu_widget_scale_factor",
|
|
DEFAULT_MENU_WIDGET_SCALE_FACTOR, "%.2fx", SD_FLAG_NONE, SDESC_RANGE_MINMAX, 0, 0.2, 5.0, 0.01, setting_action_ok_uint, NULL,
|
|
"Graphics Widgets Scale Override",
|
|
"Apply a manual scaling factor override when drawing display widgets. Only applies when 'Scale Graphics Widgets Automatically' is disabled. Can be used to increase or decrease the size of decorated notifications, indicators and controls independently from the menu itself.")
|
|
#endif
|
|
#endif
|