]> repos.lx-s.de Git - winmute.git/commitdiff
Closes #21. Replaced SetCoalescableTimer with older SetTimer for Windows 7 compatibility.
authorlx-s <lx-s@users.noreply.github.com>
Thu, 13 Apr 2023 13:03:59 +0000 (15:03 +0200)
committerlx-s <lx-s@users.noreply.github.com>
Thu, 13 Apr 2023 13:03:59 +0000 (15:03 +0200)
WinMute/QuietHoursTimer.cpp

index 6bd847584f357388b01eed43a6adcb8508a86d93..38632a75586673d80062937168b61c86c8fb5da1 100644 (file)
@@ -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<WORD>((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,