Commit Graph
27 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5.5 3bb4664fd6 Config: Describe the settings for the UI, and find them by pointer
ConfigSetting gets a ConfigSettingInfo, set with constexpr chained setters:
a label, choices, a range with step and units, labels for 0 and negative
values (like Unlimited and Disabled), and a callback for what has to happen
when the UI changes the value. Using a setter on the wrong type of setting is
a compile error. The settings in the config tables now have these, so the
settings screen can take them from there instead of repeating them, including
what changing them needs (resize and GPU config messages, fullscreen, audio
and camera notifications and so on). The settings screen starts using them
in a later commit.

Config::FindSetting finds a setting from a pointer to its value. Defaults can
now also be looked up for blocks that reset as a whole (display layouts, touch
and gesture controls), by reading them from a freshly reset copy of the block.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-25 15:12:24 +01:00
Henrik RydgårdandClaude Opus 5.5 729047d449 Config: Make the setting tables constexpr
SETTING now takes offsets with offsetof and passes them along with the
setting's type, instead of the block and member pointers, and the
ConfigSetting constructors are constexpr. So the tables are built at compile
time, and later per-setting metadata can be checked by the compiler too.

Defaults that weren't constants had to change:
- AutoFrameSkip called IsVREnabled() during static initialization, before VR
  is set up. It's now a default callback, evaluated when the config is
  loaded or reset, which can turn it on by default on VR devices.
- DisplayRefreshRate read g_Config's own initial value, which is 60.

Path defaults now share the string member of the default union.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-22 15:34:47 +02:00
Henrik Rydgård 14111097da Claude found this code buggy, and it's not used, so delete it. 2026-08-31 16:37:55 +02:00
Herman Semenoff d406f63102 Core/UI: use clear() and empty() for std containers 2026-05-17 21:28:31 +03:00
Henrik Rydgård 03c901d0cc Prepare for multiple gesture mapping zones 2026-02-04 15:01:06 +01:00
Henrik Rydgård 38ebb9d729 Set a few defaults automatically as a proof-of-concept (to reduce duplication)
See #18888
2026-01-05 19:03:43 +01:00
Henrik Rydgård 063c7d4f7e Get separate touch screen config for portrait working 2025-11-05 21:01:37 +01:00
Henrik Rydgård 1246b2d131 Correct handling of fallbacks and defaulting 2025-11-05 14:13:11 +01:00
Henrik Rydgård 2b863aafe1 Prepare for the new defaulting mechanism, IniFile cleanup 2025-11-05 12:49:52 +01:00
Henrik Rydgård 2651a3a241 Add base struct ConfigBlock 2025-11-05 12:49:52 +01:00
Henrik Rydgård 3391d65f4b Minor cleanups 2025-11-04 23:39:56 +01:00
Henrik Rydgård 4ec26d5002 More cleanup. Fix some warnings. 2025-10-31 22:37:28 +01:00
Henrik Rydgård 14ddad5ce3 Change how defaults work in the inifile reader (more flexible this way) 2025-10-31 21:57:52 +01:00
Henrik Rydgård c98b7591d3 Improve the overload resolution in IniFile 2025-10-31 15:43:52 +01:00
Henrik Rydgård c30df3084c Access config setting data by owner pointer and offset, instead of by direct pointer 2025-10-29 17:23:27 +01:00
Henrik Rydgård 60aed95e7b More config refactor 2025-10-29 15:49:43 +01:00
Henrik Rydgård 7578a1935b More config refactor 2025-10-29 15:41:41 +01:00
Henrik Rydgård 461f8586b6 Use config defaults in the headless binary.
Fixes #19332
2025-09-24 11:56:51 -06:00
Henrik Rydgård 6e5c567809 Fix some ini file misbehaviors 2025-08-31 14:13:12 +02:00
Henrik Rydgård 60608b2b39 Allow customizing the proAdhoc server list by editing the ini 2025-08-15 16:35:25 +02:00
Henrik Rydgård 01b06b76c9 Infrastructure username handling: Add separate username, pick Nickname as default if valid. 2025-01-07 17:43:02 +01:00
Giovanni Cocco 931eafd565 Keep only the LUT addition 2024-09-26 19:15:17 +02:00
Giovanni Cocco bff850dadd per game settings UI PoC 2024-08-06 14:50:23 +02:00
Henrik Rydgård 88a209a342 Move the report bool into the flags field 2023-04-08 09:22:02 +02:00
Henrik Rydgård d077a75aa4 Merge "save" and "perGame" into a flags field 2023-04-08 09:22:02 +02:00
Henrik Rydgård 6ac45ddba1 Extract the ConfigSetting implementation into its own file. 2023-04-08 09:22:02 +02:00
Henrik Rydgård 5a1e9ed8f1 Add ConfigSettings.cpp/h 2023-04-08 09:22:02 +02:00