From 81941faa8ca5ad967215c8456fa057baf1e35b34 Mon Sep 17 00:00:00 2001 From: Alessandro Toia Date: Sun, 15 Oct 2023 09:42:49 -0700 Subject: [PATCH] overlay_params: Fix not using mangohud defaults with no conf present --- src/overlay_params.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/overlay_params.cpp b/src/overlay_params.cpp index 2b35c5c7..11e89ed3 100644 --- a/src/overlay_params.cpp +++ b/src/overlay_params.cpp @@ -929,13 +929,16 @@ parse_overlay_config(struct overlay_params *params, for (const auto& option : HUDElements.options) { SPDLOG_DEBUG("Param: '{}' = '{}'", option.first, option.second); + } - if (params->enabled[OVERLAY_PARAM_ENABLED_legacy_layout]) { - HUDElements.legacy_elements(); - } else { + if (params->enabled[OVERLAY_PARAM_ENABLED_legacy_layout]) { + HUDElements.legacy_elements(); + } else { + for (auto& option : HUDElements.options) { HUDElements.sort_elements(option); } } + // Needs ImGui context but it is null here for OpenGL so just note it and update somewhere else HUDElements.colors.update = true; if (params->no_small_font)