]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Closing last expanded tree node didn't update registry/ini
authorToni Wilen <twilen@winuae.net>
Mon, 10 Mar 2025 17:31:25 +0000 (19:31 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 10 Mar 2025 17:31:25 +0000 (19:31 +0200)
od-win32/win32gui.cpp

index 021a64fe2f16632bd7f747ff5aabf9a44d0bd9c2..8e866c314e909a5a4cee97b4b34819676627f63c 100644 (file)
@@ -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);
 }