comparison src/video/win32/SDL_win32events.c @ 2794:f7872b7a8732

Fixed mouse coordinate range on Mac OS X
author Sam Lantinga <slouken@libsdl.org>
date Thu, 27 Nov 2008 21:53:18 +0000
parents 5955b6550d7e
children 99210400e8b9
comparison
equal deleted inserted replaced
2793:b14f672b2857 2794:f7872b7a8732
238 if (mice[i] == header->hDevice) { 238 if (mice[i] == header->hDevice) {
239 index = i; 239 index = i;
240 break; 240 break;
241 } 241 }
242 } 242 }
243 /* FIXME: Doesn't this defeat the point of using raw input? */
243 GetCursorPos(&point); 244 GetCursorPos(&point);
244 ScreenToClient(hwnd, &point);
245 SDL_GetWindowSize(data->windowID, &w, &h);
246 SDL_UpdateCoordinates(w, h); /* we're updating the current window size */
247 245
248 /* if the message was sent by a tablet we have to send also pressure */ 246 /* if the message was sent by a tablet we have to send also pressure */
249 if (i == tablet) { 247 if (index == tablet) {
250 SDL_SendMouseMotion(index, 0, point.x, point.y, pressure); 248 SDL_SendMouseMotion(index, 0, point.x, point.y, pressure);
251 } else { 249 } else {
252 SDL_SendMouseMotion(index, 0, point.x, point.y, 0); 250 SDL_SendMouseMotion(index, 0, point.x, point.y, 0);
253 } 251 }
254 /* we're sending mouse buttons messages to check up if sth changed */ 252 /* we're sending mouse buttons messages to check up if sth changed */