]> repos.lx-s.de Git - winmute.git/commitdiff
Fixed problem applying settings.
authorlx-s <lx-s@users.noreply.github.com>
Thu, 13 Apr 2023 13:00:43 +0000 (15:00 +0200)
committerlx-s <lx-s@users.noreply.github.com>
Thu, 13 Apr 2023 13:00:43 +0000 (15:00 +0200)
WinMute/MuteControl.cpp
WinMute/Settings_ManageEndpointsDlg.cpp
WinMute/VistaAudio.cpp

index 9b121651a876e6f27b4c5b1239ccf863aa21de78..a2b2f689f3cf5355615aec050c2d67f5e9c7aff0 100644 (file)
@@ -313,6 +313,7 @@ void MuteControl::SetManagedEndpoints(
    const std::vector<std::wstring> endpoints,
    bool isAllowList)
 {
+   winAudio_->MuteSpecificEndpoints(true);
    winAudio_->SetManagedEndpoints(endpoints, isAllowList);
 }
 
index 16f9f4bae99473c887e45c8278171c449c92fe9c..a2a8519deceddf6c6c4ee1475e9924e8aadebd33 100644 (file)
@@ -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<HWND>(wParam)) != IDC_BT_DEVICE_NAME) {
+      if (GetDlgCtrlID(reinterpret_cast<HWND>(wParam)) != IDC_ENDPOINT_NAME) {
          SetFocus(hEndpointName);
          return FALSE;
       }
index dddc7c3f6235ed42e093f39513444e5c6d996b08..7aeb94366fb22cd6aa6f44d5620e6c735f828fb2 100644 (file)
@@ -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_;