From 876a4125bf588f2d2d7c2a7e643ef6741fbbd3db Mon Sep 17 00:00:00 2001 From: Quantum Date: Mon, 30 Aug 2021 04:41:22 -0400 Subject: [PATCH] [client] egl: correctly select the preset when saving over it --- client/renderers/EGL/postprocess.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/client/renderers/EGL/postprocess.c b/client/renderers/EGL/postprocess.c index fc047f2d..b4eb80f7 100644 --- a/client/renderers/EGL/postprocess.c +++ b/client/renderers/EGL/postprocess.c @@ -286,6 +286,17 @@ static void savePresetAs(struct EGL_PostProcess * this) { if (!savePreset(this, this->presetEdit)) return; + + for (unsigned i = 0; i < stringlist_count(this->presets); ++i) + { + DEBUG_INFO("Saw preset: %s", stringlist_at(this->presets, i)); + if (strcmp(stringlist_at(this->presets, i), this->presetEdit) == 0) + { + this->activePreset = i; + return; + } + } + this->activePreset = stringlist_push(this->presets, strdup(this->presetEdit)); }