diff src/video/win32/SDL_win32video.c @ 4465:3e69e077cb95

Removed multi-mouse / multi-keyboard support in anticipation of a real multi-mouse and multi-touch API. Plus, this lets me start implementing cursor support.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 09 May 2010 20:47:22 -0700
parents f7b03b6838cb
children eff4e88cc1e8 5284a3b3217a
line wrap: on
line diff
--- a/src/video/win32/SDL_win32video.c	Sun May 09 19:55:28 2010 -0700
+++ b/src/video/win32/SDL_win32video.c	Sun May 09 20:47:22 2010 -0700
@@ -35,11 +35,6 @@
 static int WIN_VideoInit(_THIS);
 static void WIN_VideoQuit(_THIS);
 
-int total_mice = 0;             /* total mouse count */
-HANDLE *mice = NULL;            /* the handles to the detected mice */
-HCTX *g_hCtx = NULL;            /* handles to tablet contexts */
-int tablet = -1;                /* we're assuming that there is no tablet */
-
 /* WIN32 driver bootstrap functions */
 
 static int
@@ -66,9 +61,6 @@
         FreeLibrary(data->ddrawDLL);
     }
 #endif
-    if (data->wintabDLL) {
-        FreeLibrary(data->wintabDLL);
-    }
     SDL_free(device->driverdata);
     SDL_free(device);
 }
@@ -85,8 +77,10 @@
     device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
     if (device) {
         data = (struct SDL_VideoData *) SDL_calloc(1, sizeof(SDL_VideoData));
+    } else {
+        data = NULL;
     }
-    if (!device || !data) {
+    if (!data) {
         SDL_OutOfMemory();
         if (device) {
             SDL_free(device);
@@ -131,32 +125,6 @@
     }
 #endif /* SDL_VIDEO_RENDER_DDRAW */
 
-    data->wintabDLL = LoadLibrary(TEXT("WINTAB32.DLL"));
-    if (data->wintabDLL) {
-#define PROCNAME(X) #X
-        data->WTInfoA =
-            (UINT(*)(UINT, UINT, LPVOID)) GetProcAddress(data->wintabDLL,
-                                                         PROCNAME(WTInfoA));
-        data->WTOpenA =
-            (HCTX(*)(HWND, LPLOGCONTEXTA, BOOL)) GetProcAddress(data->
-                                                                wintabDLL,
-                                                                PROCNAME
-                                                                (WTOpenA));
-        data->WTPacket =
-            (int (*)(HCTX, UINT, LPVOID)) GetProcAddress(data->wintabDLL,
-                                                         PROCNAME(WTPacket));
-        data->WTClose =
-            (BOOL(*)(HCTX)) GetProcAddress(data->wintabDLL,
-                                           PROCNAME(WTClose));
-#undef PROCNAME
-
-        if (!data->WTInfoA || !data->WTOpenA || !data->WTPacket
-            || !data->WTClose) {
-            FreeLibrary(data->wintabDLL);
-            data->wintabDLL = NULL;
-        }
-    }
-
     /* Set the function pointers */
     device->VideoInit = WIN_VideoInit;
     device->VideoQuit = WIN_VideoQuit;
@@ -225,7 +193,6 @@
     GAPI_AddRenderDriver(_this);
 #endif
 
-    g_hCtx = SDL_malloc(sizeof(HCTX));
     WIN_InitKeyboard(_this);
     WIN_InitMouse(_this);
 
@@ -238,7 +205,6 @@
     WIN_QuitModes(_this);
     WIN_QuitKeyboard(_this);
     WIN_QuitMouse(_this);
-    SDL_free(g_hCtx);
 }
 
 /* vim: set ts=4 sw=4 expandtab: */