mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-23 00:36:42 -10:00
The single-source migration changed the emitted configuration tables in four distinct ways, none of which produce any diagnostic. This restores the pre-migration behaviour and adds the checks that would have caught each one, verified offline before commit: full Makefile build, a griffin-order unity compile of the settings TUs at -Werror for three profiles, and an entry-by-entry diff of the emitted tables against the pre-migration commit (31f3a60641) for desktop and Android define sets. 1) Transcribed default values. cloud_sync_sync_saves and cloud_sync_sync_configs were registered true and came back false; menu_linear_filter was registered DEFAULT_VIDEO_SMOOTH and came back a literal true, discarding the platform conditional. Restored. 2) Guard breadth. Twelve rows had their configuration registration narrowed to the descriptor's platform guard, so on other platforms they get no default and are neither saved nor loaded: audio_block_frames, microphone_block_frames, keyboard_gamepad_mapping_type (worst: guard moved from ANDROID to TARGET_OS_IPHONE, so its Android default of 1 was never applied), menu_show_reboot, menu_show_shutdown, sustained_performance_mode, ui_menubar_enable, video_ctx_scaling, suspend_screensaver_enable, video_disable_composition, accessibility_narrator_engine, and network_remote_enable (registered under HAVE_NETWORKGAMEPAD before, HAVE_NETWORKING && HAVE_NETWORK_CMD after). The guards gain SETTINGS_DEF_CONFIG_PASS terms so the configuration row emits where the hand-written table emitted it; descriptor and menu rows keep their current platform restriction. 3) default_enable. The generated grammar always applies a default, but six rows were deliberately registered without one: rgui_show_start_screen, netplay_start_as_spectator, network_remote_enable, ui_companion_toggle, state_slot, replay_slot. Applying a default resets the state and replay slots to 0 on every config load and forces the others back to compiled-in values. These rows are excluded from the configuration pass in their def files and registered by hand in configuration.c, the same idiom accessibility_enable already uses. Deliberately, no new emitter spelling is introduced anywhere: a previous attempt added _ND row names via self-aliasing '#ifndef' blocks, which leak into any translation unit that includes a def file before configuration.c defines the name for real - in the griffin unity build that is msg_hash.h, and MSVC flagged the redefinition (C4005). With no new names there is nothing to collide and nothing to undefine. 4) Duplicate registration. video_fullscreen_x/y were registered twice in the uint table, by the surviving hand-written rows and the generated ones. The hand-written pair is removed and its __WINRT__ exclusion moved onto the generated rows. This requires the config passes to define SETTINGS_DEF_CONFIG_PASS before the video_fullscreen include rather than after it; that ordering applied to all five passes. tools/settings_check.py carries both regression checks: table - preprocesses configuration.c for desktop, android and console profiles and diffs every emitted (kind, ident, default_enable, default) against tools/settings_table.reference. Intentional settings changes regenerate the reference in the same commit, putting the table delta in the diff for review. unity - compiles configuration.c, msg_hash.c, intl/msg_hash_us.c and menu/menu_setting.c concatenated in griffin/griffin.c order at -Werror for three profiles. This is the configuration in which the C4005 collision manifested; per-file builds cannot see it. Negative-tested by planting a leaked guarded alias: the check fails with the redefinition error, and passes after removal. Both run in the new Settings-Checks workflow on every push and pull request: preprocessor and -fsyntax-only only, no configure step, no dependencies beyond the runner's gcc and python3, well under a minute. The remaining table deltas against31f3a60641are intentional and verified benign: settings added since July, the separate config.def.h change to audio_fastpath_s16, and ORIENTATION_NORMAL spelled as its value 0. No sanitizer sweep is applicable: preprocessor-level changes and build-time tooling only; no executable code paths are modified.
17 lines
1.1 KiB
C
17 lines
1.1 KiB
C
/* Single-source definitions: menu scrolling group.
|
|
* 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. */
|
|
|
|
S_BOOL(menu_linear_filter, MENU_LINEAR_FILTER,
|
|
"menu_linear_filter",
|
|
DEFAULT_VIDEO_SMOOTH, SD_FLAG_NONE, 0, 0,
|
|
"Linear Filter",
|
|
"Adds a slight blur to the menu to soften hard pixel edges.")
|
|
S_UINT_EX(menu_rgui_internal_upscale_level, MENU_RGUI_INTERNAL_UPSCALE_LEVEL,
|
|
"rgui_internal_upscale_level",
|
|
DEFAULT_RGUI_INTERNAL_UPSCALE_LEVEL, SD_FLAG_ADVANCED, SDESC_RANGE_MINMAX, 0, 0, RGUI_UPSCALE_LAST-1, 1, 0, setting_action_ok_uint, setting_get_string_representation_uint_rgui_internal_upscale_level, NULL, NULL, NULL, NULL, ST_UI_TYPE_UINT_COMBOBOX,
|
|
"Internal Upscaling",
|
|
"Upscale menu interface before drawing to screen. When used with 'Menu Linear Filter' enabled, removes scaling artifacts (uneven pixels) while maintaining a sharp image. Has a significant performance impact that increases with upscaling level.")
|