From 4882bc420186a4aef19be699e3f621dec932417d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 2 Dec 2016 23:55:15 +0300 Subject: MS_SYSTEM_* services became functions --- plugins/AutoShutdown/src/cpuusage.cpp | 2 +- plugins/AutoShutdown/src/shutdownsvc.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/AutoShutdown') diff --git a/plugins/AutoShutdown/src/cpuusage.cpp b/plugins/AutoShutdown/src/cpuusage.cpp index 1bdd09efaa..555f1c8dbb 100644 --- a/plugins/AutoShutdown/src/cpuusage.cpp +++ b/plugins/AutoShutdown/src/cpuusage.cpp @@ -69,7 +69,7 @@ static BOOL CallBackAndWait(struct CpuUsageThreadParams *param, BYTE nCpuUsage) } if (!param->pfnDataAvailProc(nCpuUsage, param->lParam)) return FALSE; SleepEx(param->dwDelayMillis, TRUE); - return !Miranda_Terminated(); + return !Miranda_IsTerminated(); } static void WinNT_PollThread(void *vparam) diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp index d21934975e..553ec71f87 100644 --- a/plugins/AutoShutdown/src/shutdownsvc.cpp +++ b/plugins/AutoShutdown/src/shutdownsvc.cpp @@ -134,17 +134,17 @@ static DWORD ShutdownNow(BYTE shutdownType) DWORD dwErrCode = ERROR_SUCCESS; switch (shutdownType) { case SDSDT_CLOSEMIRANDA: - if (!Miranda_Terminated()) { + if (!Miranda_IsTerminated()) { /* waiting for short until ready (but not too long...) */ DWORD dwLastTickCount = GetTickCount(); - while (!CallService(MS_SYSTEM_OKTOEXIT, 0, 0)) { + while (!Miranda_OkToExit()) { /* infinite loop protection (max 5 sec) */ if (GetTickCount() - dwLastTickCount >= 5000) { /* wraparound works */ OutputDebugStringA("Timeout (5 sec)\n"); /* tell others, all ascii */ break; } SleepEx(1000, TRUE); - if (Miranda_Terminated()) break; /* someone else did it */ + if (Miranda_IsTerminated()) break; /* someone else did it */ OutputDebugStringA("Not ready to exit. Waiting...\n"); /* tell others, all ascii */ } /* shutdown service must be called from main thread anyway */ -- cgit v1.2.3