diff src/video/win32/SDL_win32events.c @ 4650:7ad7a473b086

More fixes for windows. Disabled tablet code.
author jimtla
date Thu, 10 Jun 2010 00:15:17 -0400
parents faa9fc8e7f67
children 03dcb795c583
line wrap: on
line diff
--- a/src/video/win32/SDL_win32events.c	Sat Jun 05 01:58:56 2010 -0400
+++ b/src/video/win32/SDL_win32events.c	Thu Jun 10 00:15:17 2010 -0400
@@ -20,9 +20,9 @@
     slouken@libsdl.org
 */
 
-#if (_WIN32_WINNT < 0x0501)
+#if (_WIN32_WINNT < 0x601)
 #undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501
+#define _WIN32_WINNT 0x601
 #endif
 
 #include "SDL_config.h"
@@ -32,11 +32,14 @@
 #include "SDL_vkeys.h"
 #include "../../events/SDL_events_c.h"
 
-/*#define WMMSG_DEBUG*/
+
+
+#define WMMSG_DEBUG
 #ifdef WMMSG_DEBUG
-#include <stdio.h>
+#include <stdio.h>	
 #include "wmmsg.h"
 #endif
+//#include <stdio.h>
 
 /* Masks for processing the windows KEYDOWN and KEYUP messages */
 #define REPEATED_KEYMASK    (1<<30)
@@ -125,9 +128,10 @@
     if (!data) {
         return CallWindowProc(DefWindowProc, hwnd, msg, wParam, lParam);
     }
+
 #ifdef WMMSG_DEBUG
-    {
-        FILE *log = fopen("wmmsg.txt", "a");
+    {		
+        FILE *log = fopen("wmmsg.txt", "a");		
         fprintf(log, "Received windows message: %p ", hwnd);
         if (msg > MAX_WMMSG) {
             fprintf(log, "%d", msg);
@@ -643,7 +647,39 @@
         }
         returnCode = 0;
         break;
-    }
+	case WM_TOUCH:
+		{
+			//printf("Got Touch Event!\n");
+    
+			FILE *log = fopen("wmmsg.txt", "a");
+			fprintf(log, "Received Touch Message: %p ", hwnd);
+			if (msg > MAX_WMMSG) {
+				fprintf(log, "%d", msg);
+			} else {
+				fprintf(log, "%s", wmtab[msg]);
+			}
+			fprintf(log, "WM_TOUCH = %d -- 0x%X, 0x%X\n",msg, wParam, lParam);
+			fclose(log);
+    
+		}
+		break;
+	case WM_GESTURE:
+		{
+			//printf("Got Touch Event!\n");
+    
+			FILE *log = fopen("wmmsg.txt", "a");
+			fprintf(log, "Received Gesture Message: %p ", hwnd);
+			if (msg > MAX_WMMSG) {
+				fprintf(log, "%d", msg);
+			} else {
+				fprintf(log, "%s", wmtab[msg]);
+			}
+			fprintf(log, "WM_GESTURE = %d -- 0x%X, 0x%X\n",msg, wParam, lParam);
+			fclose(log);
+    
+		}
+		break;		
+	}
 
     /* If there's a window proc, assume it's going to handle messages */
     if (data->wndproc) {