mirror of https://github.com/encounter/SDL.git
Fixed the windows message debug output so it works without HAVE_LIBC
This commit is contained in:
parent
e7e86c6dcd
commit
fea2699c25
|
@ -309,18 +309,16 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WMMSG_DEBUG
|
#ifdef WMMSG_DEBUG
|
||||||
{
|
{
|
||||||
FILE *log = fopen("wmmsg.txt", "a");
|
char message[1024];
|
||||||
fprintf(log, "Received windows message: %p ", hwnd);
|
if (msg > MAX_WMMSG) {
|
||||||
if (msg > MAX_WMMSG) {
|
SDL_snprintf(message, sizeof(message), "Received windows message: %p UNKNOWN (%d) -- 0x%X, 0x%X\n", hwnd, msg, wParam, lParam);
|
||||||
fprintf(log, "%d", msg);
|
} else {
|
||||||
} else {
|
SDL_snprintf(message, sizeof(message), "Received windows message: %p %s -- 0x%X, 0x%X\n", hwnd, wmtab[msg], wParam, lParam);
|
||||||
fprintf(log, "%s", wmtab[msg]);
|
}
|
||||||
}
|
OutputDebugStringA(message);
|
||||||
fprintf(log, " -- 0x%X, 0x%X\n", wParam, lParam);
|
}
|
||||||
fclose(log);
|
#endif /* WMMSG_DEBUG */
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (IME_HandleMessage(hwnd, msg, wParam, &lParam, data->videodata))
|
if (IME_HandleMessage(hwnd, msg, wParam, &lParam, data->videodata))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue