]> repos.lx-s.de Git - winmute.git/commitdiff
Merge branch 'main' into dev
authorlx-s <lx-s@users.noreply.github.com>
Wed, 3 Aug 2022 08:23:18 +0000 (10:23 +0200)
committerlx-s <lx-s@users.noreply.github.com>
Wed, 3 Aug 2022 08:23:18 +0000 (10:23 +0200)
1  2 
WinMute/MuteControl.cpp
WinMute/MuteControl.h

index 8627eaf96aaf5d9df76f5d208728eef976ede047,eb014cf9f90ada678a53ed97252198fe9dcc1c9e..540ad89357240c6086e45bca850e8ced9afbd12a
@@@ -126,10 -125,13 +126,13 @@@ void MuteControl::RestoreVolume(bool wi
        }
     }
     if (restore) {
 -      log.Write(_T("Restoring previous mute state"));
 +      log.Write(L"Restoring previous mute state");
        ShowNotification(
 -         _T("Volume restored"),
 -         _T("All endpoints have been restored to their previous configuration"));
 +         L"Volume restored",
 +         L"All endpoints have been restored to their previous configuration");
+       if (withDelay) {
+          Sleep(2000);
+       }
        winAudio_->RestoreMuteStatus();
     }
  }
index 8ccc91ba8b108fa9c21cade2e3465b5828351063,01f4b471c77e13a9014a83b3c364dbcc54246c71..0db0640f9af8d953d3d640a2d89b223ab7abab10
@@@ -98,8 -95,8 +98,8 @@@ private
  
     const TrayIcon* trayIcon_;
  
-    void NotifyRestoreCondition(int type, bool active);
+    void NotifyRestoreCondition(int type, bool active, bool withDelay);
     void SaveMuteStatus();
-    void RestoreVolume();
+    void RestoreVolume(bool withDelay = false);
 -   void ShowNotification(const tstring& title, const tstring& text);
 +   void ShowNotification(const std::wstring& title, const std::wstring& text);
  };