opció de preset al service menu (params_file → params_preset)
Defaults::Settings::PARAMS_FILE passa a PARAMS_PRESET (id intern: classic/arcade/red); director concatena .txt al carregar. Nou ListOption "GAME_PRESET" al service menu amb les tres opcions localitzades (cal reinici per aplicar). Validació al parser del YAML: si el preset desat no existeix, cau al default.
This commit is contained in:
@@ -541,6 +541,22 @@ void ServiceMenu::addSettingsOptions() {
|
||||
Options::checkPendingChanges();
|
||||
}));
|
||||
|
||||
// Preset de paràmetres (requereix reinici): cicla classic/arcade/red
|
||||
std::vector<std::string> preset_display_names;
|
||||
preset_display_names.reserve(Options::PARAMS_PRESETS.size());
|
||||
std::ranges::transform(Options::PARAMS_PRESETS, std::back_inserter(preset_display_names), Options::getParamsPresetDisplayName);
|
||||
options_.push_back(std::make_unique<ListOption>(
|
||||
Lang::getText("[SERVICE_MENU] GAME_PRESET"),
|
||||
SettingsGroup::SETTINGS,
|
||||
preset_display_names,
|
||||
[]() -> std::string {
|
||||
return Options::getParamsPresetDisplayName(Options::pending_changes.new_params_preset);
|
||||
},
|
||||
[](const std::string& val) -> void {
|
||||
Options::pending_changes.new_params_preset = Options::getParamsPresetIdFromDisplay(val);
|
||||
Options::checkPendingChanges();
|
||||
}));
|
||||
|
||||
options_.push_back(std::make_unique<BoolOption>(
|
||||
Lang::getText("[SERVICE_MENU] ENABLE_SHUTDOWN"),
|
||||
SettingsGroup::SETTINGS,
|
||||
|
||||
Reference in New Issue
Block a user