comparison src/video/win32/SDL_win32mouse.c @ 2726:f23ebf1ddac4

Dynamically load wintab32.dll
author Sam Lantinga <slouken@libsdl.org>
date Tue, 26 Aug 2008 06:03:48 +0000
parents 0e2b65f32298
children 2768bd7281e0
comparison
equal deleted inserted replaced
2725:6ce6d56b63bf 2726:f23ebf1ddac4
152 SDL_zero(mouse); 152 SDL_zero(mouse);
153 SDL_SetMouseIndexId(index, index); 153 SDL_SetMouseIndexId(index, index);
154 l = SDL_strlen(device_name); 154 l = SDL_strlen(device_name);
155 155
156 /* we're checking if the device isn't by any chance a tablet */ 156 /* we're checking if the device isn't by any chance a tablet */
157 if (tablet == -1) { 157 if (data->wintabDLL && tablet == -1) {
158 for (j = 0; j < l - 5; ++j) { 158 for (j = 0; j < l - 5; ++j) {
159 for (k = 0; k < 5; ++k) { 159 for (k = 0; k < 5; ++k) {
160 if (tab[k] != 160 if (tab[k] !=
161 SDL_tolower((unsigned char) device_name[j + k])) { 161 SDL_tolower((unsigned char) device_name[j + k])) {
162 break; 162 break;
171 171
172 /* if it's a tablet, let's read it's maximum and minimum pressure */ 172 /* if it's a tablet, let's read it's maximum and minimum pressure */
173 if (tablet == index) { 173 if (tablet == index) {
174 AXIS pressure; 174 AXIS pressure;
175 int cursors; 175 int cursors;
176 WTInfo(WTI_DEVICES, DVC_NPRESSURE, &pressure); 176 data->WTInfo(WTI_DEVICES, DVC_NPRESSURE, &pressure);
177 WTInfo(WTI_DEVICES, DVC_NCSRTYPES, &cursors); 177 data->WTInfo(WTI_DEVICES, DVC_NCSRTYPES, &cursors);
178 data->mouse = 178 data->mouse =
179 SDL_AddMouse(&mouse, index, device_name, pressure.axMax, 179 SDL_AddMouse(&mouse, index, device_name, pressure.axMax,
180 pressure.axMin, cursors); 180 pressure.axMin, cursors);
181 } else { 181 } else {
182 data->mouse = SDL_AddMouse(&mouse, index, device_name, 0, 0, 1); 182 data->mouse = SDL_AddMouse(&mouse, index, device_name, 0, 0, 1);