From: Toni Wilen Date: Mon, 10 Mar 2025 17:31:25 +0000 (+0200) Subject: Closing last expanded tree node didn't update registry/ini X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=78debe63e42a7444f6a8ecd8880aa9e1bb6013aa;p=francis%2Fwinuae.git Closing last expanded tree node didn't update registry/ini --- diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 021a64fe..8e866c31 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -5822,15 +5822,19 @@ static void ConfigToRegistry(struct ConfigStruct *config, int type) } idx++; } - if (fkey) { - while (exp < 1000) { - TCHAR tmp[100]; - _stprintf(tmp, _T("Expanded%03d"), exp++); - if (!regexists(fkey, tmp)) { - break; - } - regdelete(fkey, tmp); + while (exp < 1000) { + TCHAR tmp[100]; + _stprintf(tmp, _T("Expanded%03d"), exp++); + if (!fkey) { + fkey = regcreatetree(NULL, _T("ConfigurationListView")); + } + if (!fkey) { + break; + } + if (!regexists(fkey, tmp)) { + break; } + regdelete(fkey, tmp); } regclosetree(fkey); }