src/video/windows/SDL_windowsevents.c
changeset 7816 f16e342b167a
parent 7813 d8fb783475d5
child 7911 a9135f92ddba
     1.1 --- a/src/video/windows/SDL_windowsevents.c	Mon Oct 14 08:56:45 2013 -0700
     1.2 +++ b/src/video/windows/SDL_windowsevents.c	Mon Oct 14 08:56:50 2013 -0700
     1.3 @@ -309,18 +309,16 @@
     1.4      }
     1.5  
     1.6  #ifdef WMMSG_DEBUG
     1.7 -    {
     1.8 -        FILE *log = fopen("wmmsg.txt", "a");
     1.9 -        fprintf(log, "Received windows message: %p ", hwnd);
    1.10 -        if (msg > MAX_WMMSG) {
    1.11 -            fprintf(log, "%d", msg);
    1.12 -        } else {
    1.13 -            fprintf(log, "%s", wmtab[msg]);
    1.14 -        }
    1.15 -        fprintf(log, " -- 0x%X, 0x%X\n", wParam, lParam);
    1.16 -        fclose(log);
    1.17 -    }
    1.18 -#endif
    1.19 +	{
    1.20 +		char message[1024];
    1.21 +		if (msg > MAX_WMMSG) {
    1.22 +			SDL_snprintf(message, sizeof(message), "Received windows message: %p UNKNOWN (%d) -- 0x%X, 0x%X\n", hwnd, msg, wParam, lParam);
    1.23 +		} else {
    1.24 +			SDL_snprintf(message, sizeof(message), "Received windows message: %p %s -- 0x%X, 0x%X\n", hwnd, wmtab[msg], wParam, lParam);
    1.25 +		}
    1.26 +		OutputDebugStringA(message);
    1.27 +	}
    1.28 +#endif /* WMMSG_DEBUG */
    1.29  
    1.30      if (IME_HandleMessage(hwnd, msg, wParam, &lParam, data->videodata))
    1.31          return 0;