diff --git a/src/overlay.cpp b/src/overlay.cpp index 311dac4b..0b8776d3 100644 --- a/src/overlay.cpp +++ b/src/overlay.cpp @@ -666,8 +666,10 @@ void horizontal_separator(struct overlay_params& params) { void render_imgui(swapchain_stats& data, struct overlay_params& params, ImVec2& window_size, bool is_vulkan) { - std::unique_lock lock(config_mtx); - config_cv.wait(lock, []{ return config_ready; }); + { + std::unique_lock lock(config_mtx); + config_cv.wait(lock, []{ return config_ready; }); + } // data.engine = EngineTypes::GAMESCOPE; HUDElements.sw_stats = &data; HUDElements.params = ¶ms; HUDElements.is_vulkan = is_vulkan;