Skip to main content

Recommended game settings

src/common/game_presets.h contains the Settings::game_presets catalogue, keyed by program ID. Each entry supplies a display name and the settings to recommend:

src/common/game_presets.h
{0x0100000000000000ULL,
{"Example Game",
{{"renderer_backend", RendererBackend::Vulkan},
{"resolution_setup", ResolutionSetup::Res1X},
{"use_asynchronous_shaders", true}}}},

Each recommendation is a setting label and a value encoded like a configuration file: enum values are stored by their underlying integer, booleans as true or false, and arithmetic values as numbers. Use the registered labels from src/common/settings.h (for example, renderer_backend, not backend).

StepWhat to do
1Add the program ID and GamePreset to Settings::game_presets in src/common/game_presets.h.
2List only settings that need recommendations; unlisted settings are unchanged.
3Run ./build/bin/tests "[game_presets]" to validate keys and values.
Requirements

Every key must be a registered setting label and refer to a switchable setting. The tests check both conditions. Switchable settings allow recommendations to override the active game's settings without replacing the user's global preference.

Adding a catalogue entry enables the existing prompt, setting descriptions, application, and save behavior; no game-specific frontend function, session flag, or configuration key is needed.

The Qt frontend asks once per program ID per session. Apply Selected applies the checked recommendations for that launch. The dialog's separate save option saves the selected values to the game's per-game configuration when one is available. Keep Current Settings launches without applying recommendations. Don't ask again for this game stores the program ID in the UI configuration; future launches then use saved settings, including manual edits. Closing the dialog cancels that launch. Command-line launches use saved settings without showing this Qt prompt.

On first load, legacy skip_mkw_settings_prompt and skip_oot_settings_prompt preferences are migrated to the program-ID skip list, but only if the new skipped_recommended_settings array is absent.