diff src/video/win32/SDL_win32events.c @ 1913:83420da906a5

Implemented Windows OpenGL support Fixed slowdown enumerating display modes, which was hosing OpenGL as well... Removed SDL_ from the render driver prefixes
author Sam Lantinga <slouken@libsdl.org>
date Mon, 17 Jul 2006 06:47:33 +0000
parents c121d94672cb
children 7177581dc9fa
line wrap: on
line diff
--- a/src/video/win32/SDL_win32events.c	Sun Jul 16 09:34:01 2006 +0000
+++ b/src/video/win32/SDL_win32events.c	Mon Jul 17 06:47:33 2006 +0000
@@ -29,6 +29,7 @@
 
 /*#define WMMSG_DEBUG*/
 #ifdef WMMSG_DEBUG
+#include <stdio.h>
 #include "wmmsg.h"
 #endif
 
@@ -398,13 +399,17 @@
         return CallWindowProc(DefWindowProc, hwnd, msg, wParam, lParam);
     }
 #ifdef WMMSG_DEBUG
-    fprintf(stderr, "Received windows message:  ");
-    if (msg > MAX_WMMSG) {
-        fprintf(stderr, "%d", msg);
-    } else {
-        fprintf(stderr, "%s", wmtab[msg]);
+    {
+        FILE *log = fopen("wmmsg.txt", "a");
+        fprintf(log, "Received windows message: %p ", hwnd);
+        if (msg > MAX_WMMSG) {
+            fprintf(log, "%d", msg);
+        } else {
+            fprintf(log, "%s", wmtab[msg]);
+        }
+        fprintf(log, " -- 0x%X, 0x%X\n", wParam, lParam);
+        fclose(log);
     }
-    fprintf(stderr, " -- 0x%X, 0x%X\n", wParam, lParam);
 #endif
 
     /* Send a SDL_SYSWMEVENT if the application wants them */