From: lx-s Date: Thu, 13 Apr 2023 13:00:43 +0000 (+0200) Subject: Fixed problem applying settings. X-Git-Tag: 2.3.1.0~9^2 X-Git-Url: https://repos.lx-s.de/gitweb/?a=commitdiff_plain;h=b390648fbfe019dcbf20c36c65561c5bd73f6a99;p=winmute.git Fixed problem applying settings. --- diff --git a/WinMute/MuteControl.cpp b/WinMute/MuteControl.cpp index 9b12165..a2b2f68 100644 --- a/WinMute/MuteControl.cpp +++ b/WinMute/MuteControl.cpp @@ -313,6 +313,7 @@ void MuteControl::SetManagedEndpoints( const std::vector endpoints, bool isAllowList) { + winAudio_->MuteSpecificEndpoints(true); winAudio_->SetManagedEndpoints(endpoints, isAllowList); } diff --git a/WinMute/Settings_ManageEndpointsDlg.cpp b/WinMute/Settings_ManageEndpointsDlg.cpp index 16f9f4b..a2a8519 100644 --- a/WinMute/Settings_ManageEndpointsDlg.cpp +++ b/WinMute/Settings_ManageEndpointsDlg.cpp @@ -120,7 +120,7 @@ static INT_PTR CALLBACK Settings_EndpointAddDlgProc(HWND hDlg, UINT msg, WPARAM } } else { if (!SetWindowTextW(hDlg, L"Edit endpoint") || - !SetWindowTextW(GetDlgItem(hDlg, IDC_BT_DEVICE_NAME), + !SetWindowTextW(GetDlgItem(hDlg, IDC_ENDPOINT_NAME), endpointData->name.c_str())) { PrintWindowsError(L"SetWindowText", GetLastError()); return FALSE; @@ -135,7 +135,7 @@ static INT_PTR CALLBACK Settings_EndpointAddDlgProc(HWND hDlg, UINT msg, WPARAM } Edit_LimitText(hEndpointName, ENDPOINT_NAME_MAX_LEN); - if (GetDlgCtrlID(reinterpret_cast(wParam)) != IDC_BT_DEVICE_NAME) { + if (GetDlgCtrlID(reinterpret_cast(wParam)) != IDC_ENDPOINT_NAME) { SetFocus(hEndpointName); return FALSE; } diff --git a/WinMute/VistaAudio.cpp b/WinMute/VistaAudio.cpp index dddc7c3..7aeb943 100644 --- a/WinMute/VistaAudio.cpp +++ b/WinMute/VistaAudio.cpp @@ -323,6 +323,7 @@ bool VistaAudio::IsEndpointManaged(const std::wstring &endpointName) const // ------------+----------+-------------+ // Allow List | Mute | Not mute | // Block List | Not mute | Mute | + return inManagedEndpoints ? muteSpecificEndpointsAllowList_ : !muteSpecificEndpointsAllowList_;