]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix sound panel floppy sound selection
authorToni Wilen <twilen@winuae.net>
Sat, 21 Oct 2023 15:46:36 +0000 (18:46 +0300)
committerToni Wilen <twilen@winuae.net>
Sat, 21 Oct 2023 15:46:36 +0000 (18:46 +0300)
od-win32/win32gui.cpp

index f6f6e46faf231b179f9cf8538d58c2f4cf08774a..d7f4110a0ee0c53d01a05412b52a18429beefae2 100644 (file)
@@ -14361,7 +14361,10 @@ static INT_PTR CALLBACK SoundDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM
                        pages[SOUND_ID] = hDlg;
                        currentpage = SOUND_ID;
                        update_soundgui (hDlg);
+                       values_to_sounddlg(hDlg);
+                       enable_for_sounddlg(hDlg);
                        recursive--;
+                       return TRUE;
                }
        case WM_USER:
                recursive++;
@@ -14374,16 +14377,14 @@ static INT_PTR CALLBACK SoundDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM
                if (recursive > 0)
                        break;
                recursive++;
-               if (HIWORD(wParam) == CBN_SELCHANGE || HIWORD(wParam) == CBN_KILLFOCUS) {
-                       switch (LOWORD(wParam))
-                       {
-                               case IDC_SOUNDDRIVE:
-                                       values_to_sounddlg(hDlg);
-                                       break;
+               if (LOWORD(wParam) == IDC_SOUNDDRIVE) {
+                       if (HIWORD(wParam) == CBN_SELCHANGE || HIWORD(wParam) == CBN_KILLFOCUS) {
+                               values_to_sounddlg(hDlg);
                        }
+               } else {
+                       values_from_sounddlg (hDlg);
                }
-               values_from_sounddlg (hDlg);
-               enable_for_sounddlg (hDlg);
+               enable_for_sounddlg(hDlg);
                recursive--;
                break;