From: lx-s Date: Wed, 3 Aug 2022 08:23:18 +0000 (+0200) Subject: Merge branch 'main' into dev X-Git-Tag: 2.1.1.0~4 X-Git-Url: https://repos.lx-s.de/gitweb/?a=commitdiff_plain;h=06ce4847a014c5750b8d065fa17e50372ecfad1f;p=winmute.git Merge branch 'main' into dev --- 06ce4847a014c5750b8d065fa17e50372ecfad1f diff --cc WinMute/MuteControl.cpp index 8627eaf,eb014cf..540ad89 --- a/WinMute/MuteControl.cpp +++ b/WinMute/MuteControl.cpp @@@ -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(); } } diff --cc WinMute/MuteControl.h index 8ccc91b,01f4b47..0db0640 --- a/WinMute/MuteControl.h +++ b/WinMute/MuteControl.h @@@ -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); };