hw/xwin: Remove GetTickCount() from various pieces of debugging output

The use of %d format for the DWORD return value of GetTickCount() isn't
portable, but it doesn't seem to be worth fixing it when this information isn't
very useful (and is redundant to the timestamping of log messages we now have)

Instead just remove these uses of GetTickCount()

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Jon TURNEY 2015-06-29 15:30:36 +01:00
parent 732e3b9c08
commit 38f340b13e
4 changed files with 18 additions and 25 deletions

View File

@ -219,8 +219,8 @@ winPositionWindowMultiWindow(WindowPtr pWin, int x, int y)
#if CYGMULTIWINDOW_DEBUG
lpRc = &rcNew;
ErrorF("winPositionWindowMultiWindow - (%d ms)drawable (%d, %d)-(%d, %d)\n",
GetTickCount(), lpRc->left, lpRc->top, lpRc->right, lpRc->bottom);
ErrorF("winPositionWindowMultiWindow - drawable (%d, %d)-(%d, %d)\n",
lpRc->left, lpRc->top, lpRc->right, lpRc->bottom);
#endif
/*
@ -237,16 +237,16 @@ winPositionWindowMultiWindow(WindowPtr pWin, int x, int y)
GetClientRect(hWnd, &rcClient);
lpRc = &rcNew;
ErrorF("winPositionWindowMultiWindow - (%d ms)rcNew (%d, %d)-(%d, %d)\n",
GetTickCount(), lpRc->left, lpRc->top, lpRc->right, lpRc->bottom);
ErrorF("winPositionWindowMultiWindow - rcNew (%d, %d)-(%d, %d)\n",
lpRc->left, lpRc->top, lpRc->right, lpRc->bottom);
lpRc = &rcOld;
ErrorF("winPositionWindowMultiWindow - (%d ms)rcOld (%d, %d)-(%d, %d)\n",
GetTickCount(), lpRc->left, lpRc->top, lpRc->right, lpRc->bottom);
ErrorF("winPositionWindowMultiWindow - rcOld (%d, %d)-(%d, %d)\n",
lpRc->left, lpRc->top, lpRc->right, lpRc->bottom);
lpRc = &rcClient;
ErrorF("(%d ms)rcClient (%d, %d)-(%d, %d)\n",
GetTickCount(), lpRc->left, lpRc->top, lpRc->right, lpRc->bottom);
ErrorF("rcClient (%d, %d)-(%d, %d)\n",
lpRc->left, lpRc->top, lpRc->right, lpRc->bottom);
#endif
/* Check if the old rectangle and new rectangle are the same */

View File

@ -772,8 +772,8 @@ winMultiWindowWMProc(void *pArg)
}
#if CYGMULTIWINDOW_DEBUG
ErrorF("winMultiWindowWMProc - %d ms MSG: %d ID: %d\n",
GetTickCount(), (int) pNode->msg.msg, (int) pNode->msg.dwID);
ErrorF("winMultiWindowWMProc - MSG: %d ID: %d\n",
(int) pNode->msg.msg, (int) pNode->msg.dwID);
#endif
/* Branch on the message type */

View File

@ -1037,9 +1037,8 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
default:
strcpy(buf, "UNKNOWN_FLAG");
}
ErrorF("winTopLevelWindowProc - WM_SIZE to %dx%d (%s) - %d ms\n",
(int) LOWORD(lParam), (int) HIWORD(lParam), buf,
(int) (GetTickCount()));
ErrorF("winTopLevelWindowProc - WM_SIZE to %dx%d (%s)\n",
(int) LOWORD(lParam), (int) HIWORD(lParam), buf);
}
#endif
if (!hasEnteredSizeMove) {

View File

@ -858,8 +858,7 @@ winMWExtWMWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_MOVE:
#if CYGMULTIWINDOW_DEBUG
winDebug("winMWExtWMWindowProc - WM_MOVE - %d ms\n",
(unsigned int) GetTickCount());
winDebug("winMWExtWMWindowProc - WM_MOVE\n");
#endif
if (g_fNoConfigureWindow)
break;
@ -902,8 +901,7 @@ winMWExtWMWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_SHOWWINDOW:
#if CYGMULTIWINDOW_DEBUG || TRUE
winDebug("winMWExtWMWindowProc - WM_SHOWWINDOW - %d ms\n",
(unsigned int) GetTickCount());
winDebug("winMWExtWMWindowProc - WM_SHOWWINDOW\n");
#endif
/* Bail out if the window is being hidden */
if (!wParam)
@ -1155,8 +1153,7 @@ winMWExtWMWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
/* see dix/window.c */
/* FIXME: Maximize/Restore? */
#if CYGMULTIWINDOW_DEBUG
winDebug("winMWExtWMWindowProc - WM_SIZE - %d ms\n",
(unsigned int) GetTickCount());
winDebug("winMWExtWMWindowProc - WM_SIZE\n");
#endif
#if CYGMULTIWINDOW_DEBUG
winDebug("\t(%d, %d) %d\n", (short) LOWORD(lParam),
@ -1224,8 +1221,7 @@ winMWExtWMWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_ACTIVATEAPP:
#if CYGMULTIWINDOW_DEBUG
winDebug("winMWExtWMWindowProc - WM_ACTIVATEAPP - %d ms\n",
(unsigned int) GetTickCount());
winDebug("winMWExtWMWindowProc - WM_ACTIVATEAPP\n");
#endif
if (wParam) {
if (winIsInternalWMRunning(pScreenInfo)) {
@ -1257,16 +1253,14 @@ winMWExtWMWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_ENTERSIZEMOVE:
#if CYGMULTIWINDOW_DEBUG
winDebug("winMWExtWMWindowProc - WM_ENTERSIZEMOVE - %d ms\n",
(unsigned int) GetTickCount());
winDebug("winMWExtWMWindowProc - WM_ENTERSIZEMOVE\n");
#endif
pRLWinPriv->fMovingOrSizing = TRUE;
break;
case WM_EXITSIZEMOVE:
#if CYGMULTIWINDOW_DEBUG
winDebug("winMWExtWMWindowProc - WM_EXITSIZEMOVE - %d ms\n",
(unsigned int) GetTickCount());
winDebug("winMWExtWMWindowProc - WM_EXITSIZEMOVE\n");
#endif
pRLWinPriv->fMovingOrSizing = FALSE;