From: lx-s Date: Thu, 13 Apr 2023 13:03:59 +0000 (+0200) Subject: Closes #21. Replaced SetCoalescableTimer with older SetTimer for Windows 7 compatibility. X-Git-Tag: 2.3.1.0~8 X-Git-Url: https://repos.lx-s.de/gitweb/?a=commitdiff_plain;h=da9bc544ed0fdb67a1843497918c8987e2d91bbe;p=winmute.git Closes #21. Replaced SetCoalescableTimer with older SetTimer for Windows 7 compatibility. --- diff --git a/WinMute/QuietHoursTimer.cpp b/WinMute/QuietHoursTimer.cpp index 6bd8475..38632a7 100644 --- a/WinMute/QuietHoursTimer.cpp +++ b/WinMute/QuietHoursTimer.cpp @@ -148,12 +148,11 @@ bool QuietHoursTimer::LoadFromSettings(const WMSettings& settings) SendMessage(hParent_, WM_WINMUTE_QUIETHOURS_START, 0, 0); } else { int timerQhStart = GetDiffMillseconds(&start, &now); - if (SetCoalescableTimer( + if (SetTimer( hParent_, QUIETHOURS_TIMER_START_ID, timerQhStart, - QuietHoursTimerProc, - TIMERV_DEFAULT_COALESCING) == 0) { + QuietHoursTimerProc) == 0) { TaskDialog( hParent_, hglobInstance, @@ -182,12 +181,11 @@ bool QuietHoursTimer::SetStart() start.wHour = static_cast((qhStart_ - start.wMinute - start.wSecond) / 3600); const int timerQhStart = GetDiffMillseconds(&start, &now); - if (SetCoalescableTimer( + if (SetTimer( hParent_, QUIETHOURS_TIMER_START_ID, timerQhStart, - QuietHoursTimerProc, - TIMERV_DEFAULT_COALESCING) == 0) { + QuietHoursTimerProc) == 0) { TaskDialog( hParent_, hglobInstance, @@ -217,12 +215,11 @@ bool QuietHoursTimer::SetEnd() int timerQhEnd = GetDiffMillseconds(&end, &now); if (timerQhEnd <= 0) { SendMessage(hParent_, WM_WINMUTE_QUIETHOURS_END, 0, 0); - } else if (SetCoalescableTimer( + } else if (SetTimer( hParent_, QUIETHOURS_TIMER_END_ID, timerQhEnd, - QuietHoursTimerProc, - TIMERV_DEFAULT_COALESCING) == 0) { + QuietHoursTimerProc) == 0) { TaskDialog( hParent_, hglobInstance,