From c92d7b8a36c7f90d5107e5e5a0ad0a4e1fe1f938 Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Wed, 22 Sep 2004 19:53:14 +0000 Subject: [PATCH] Fix building for building on both Mingw and MS_VC. svn path=/trunk/; revision=10982 --- reactos/subsys/system/taskmgr/perfpage.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/reactos/subsys/system/taskmgr/perfpage.c b/reactos/subsys/system/taskmgr/perfpage.c index 9cc83751ac3..41494406f56 100644 --- a/reactos/subsys/system/taskmgr/perfpage.c +++ b/reactos/subsys/system/taskmgr/perfpage.c @@ -67,6 +67,7 @@ HWND hPerformancePageTotalsThreadCountEdit; /* Total Threads Edit Control */ static int nPerformancePageWidth; static int nPerformancePageHeight; +static int lastX, lastY; static HANDLE hPerformancePageEvent = NULL; /* When this event becomes signaled then we refresh the performance page */ DWORD WINAPI PerformancePageRefreshThread(void *lpParameter); @@ -266,8 +267,6 @@ LRESULT CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam, AdjustControlPostion(hPerformancePageTotalsProcessCountEdit, hDlg, 0, nYDifference); AdjustControlPostion(hPerformancePageTotalsThreadCountEdit, hDlg, 0, nYDifference); - static int lastX, lastY; - nXDifference += lastX; nYDifference += lastY; lastX = lastY = 0; @@ -315,6 +314,9 @@ DWORD WINAPI PerformancePageRefreshThread(void *lpParameter) ULONG CommitChargeLimit; ULONG CommitChargePeak; + ULONG CpuUsage; + ULONG CpuKernelUsage; + ULONG KernelMemoryTotal; ULONG KernelMemoryPaged; ULONG KernelMemoryNonPaged; @@ -340,6 +342,9 @@ DWORD WINAPI PerformancePageRefreshThread(void *lpParameter) { DWORD dwWaitVal; + int nBarsUsed1; + int nBarsUsed2; + /* Wait on the event */ dwWaitVal = WaitForSingleObject(hPerformancePageEvent, INFINITE); @@ -413,16 +418,6 @@ DWORD WINAPI PerformancePageRefreshThread(void *lpParameter) InvalidateRect(hPerformancePageCpuUsageGraph, NULL, FALSE); InvalidateRect(hPerformancePageMemUsageGraph, NULL, FALSE); - - ULONG CpuUsage; - ULONG CpuKernelUsage; - ULONGLONG CommitChargeTotal; - ULONGLONG CommitChargeLimit; - ULONG PhysicalMemoryTotal; - ULONG PhysicalMemoryAvailable; - int nBarsUsed1; - int nBarsUsed2; - /* * Get the CPU usage */