From: Toni Wilen Date: Sat, 21 Oct 2023 15:46:36 +0000 (+0300) Subject: Fix sound panel floppy sound selection X-Git-Tag: 5.1.0~72 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=b81b1bcf65b98e49cc73b6d6623aeaab5ac8025d;p=francis%2Fwinuae.git Fix sound panel floppy sound selection --- diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index f6f6e46f..d7f4110a 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -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;