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 */