Mercurial > sdl-ios-xcode
comparison src/video/win32/SDL_win32video.c @ 2710:44e49d3fa6cf
Final merge of Google Summer of Code 2008 work...
Many-mouse and tablet support
by Szymon Wilczek, mentored by Ryan C. Gordon
Everything concerning the project is noted on the wiki:
http://wilku.ravenlord.ws/doku.php?id=start
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 25 Aug 2008 06:33:00 +0000 |
parents | 420716272158 |
children | 0e2b65f32298 |
comparison
equal
deleted
inserted
replaced
2709:fd3f0f1147e7 | 2710:44e49d3fa6cf |
---|---|
29 | 29 |
30 #include "SDL_win32video.h" | 30 #include "SDL_win32video.h" |
31 #include "SDL_d3drender.h" | 31 #include "SDL_d3drender.h" |
32 #include "SDL_gdirender.h" | 32 #include "SDL_gdirender.h" |
33 | 33 |
34 #include <wintab.h> | |
35 | |
34 /* Initialization/Query functions */ | 36 /* Initialization/Query functions */ |
35 static int WIN_VideoInit(_THIS); | 37 static int WIN_VideoInit(_THIS); |
36 static void WIN_VideoQuit(_THIS); | 38 static void WIN_VideoQuit(_THIS); |
39 | |
40 int total_mice = 0; /* total mouse count */ | |
41 HANDLE *mice = NULL; /* the handles to the detected mice */ | |
42 HCTX *g_hCtx = NULL; /* handles to tablet contexts */ | |
43 int tablet = -1; /* we're assuming that there is no tablet */ | |
37 | 44 |
38 /* WIN32 driver bootstrap functions */ | 45 /* WIN32 driver bootstrap functions */ |
39 | 46 |
40 static int | 47 static int |
41 WIN_Available(void) | 48 WIN_Available(void) |
138 | 145 |
139 return device; | 146 return device; |
140 } | 147 } |
141 | 148 |
142 VideoBootStrap WIN32_bootstrap = { | 149 VideoBootStrap WIN32_bootstrap = { |
143 "win32", "SDL Win32/64 video driver", | 150 "win32", "SDL Win32/64 video driver", WIN_Available, WIN_CreateDevice |
144 WIN_Available, WIN_CreateDevice | |
145 }; | 151 }; |
146 | 152 |
147 | 153 |
148 int | 154 int |
149 WIN_VideoInit(_THIS) | 155 WIN_VideoInit(_THIS) |
155 #endif | 161 #endif |
156 #if SDL_VIDEO_RENDER_GDI | 162 #if SDL_VIDEO_RENDER_GDI |
157 GDI_AddRenderDriver(_this); | 163 GDI_AddRenderDriver(_this); |
158 #endif | 164 #endif |
159 | 165 |
166 g_hCtx = SDL_malloc(sizeof(HCTX)); | |
160 WIN_InitKeyboard(_this); | 167 WIN_InitKeyboard(_this); |
161 WIN_InitMouse(_this); | 168 WIN_InitMouse(_this); |
162 | 169 |
163 return 0; | 170 return 0; |
164 } | 171 } |
167 WIN_VideoQuit(_THIS) | 174 WIN_VideoQuit(_THIS) |
168 { | 175 { |
169 WIN_QuitModes(_this); | 176 WIN_QuitModes(_this); |
170 WIN_QuitKeyboard(_this); | 177 WIN_QuitKeyboard(_this); |
171 WIN_QuitMouse(_this); | 178 WIN_QuitMouse(_this); |
179 SDL_free(g_hCtx); | |
172 } | 180 } |
173 | 181 |
174 /* vim: set ts=4 sw=4 expandtab: */ | 182 /* vim: set ts=4 sw=4 expandtab: */ |