comparison src/video/windib/SDL_dibevents.c @ 4270:6b7f9089105e SDL-1.2

Fixed VC2005 compiler warnings
author Sam Lantinga <slouken@libsdl.org>
date Wed, 30 Sep 2009 20:38:28 +0000
parents cbe5222d051a
children 9ea4413f0a9e
comparison
equal deleted inserted replaced
4269:60db3d01cb3a 4270:6b7f9089105e
339 POINT center; 339 POINT center;
340 center.x = (SDL_VideoSurface->w/2); 340 center.x = (SDL_VideoSurface->w/2);
341 center.y = (SDL_VideoSurface->h/2); 341 center.y = (SDL_VideoSurface->h/2);
342 ClientToScreen(SDL_Window, &center); 342 ClientToScreen(SDL_Window, &center);
343 343
344 mouse.x -= (Sint16)center.x; 344 mouse.x -= center.x;
345 mouse.y -= (Sint16)center.y; 345 mouse.y -= center.y;
346 if ( mouse.x || mouse.y ) { 346 if ( mouse.x || mouse.y ) {
347 SetCursorPos(center.x, center.y); 347 SetCursorPos(center.x, center.y);
348 posted = SDL_PrivateMouseMotion(0, 1, mouse.x, mouse.y); 348 posted = SDL_PrivateMouseMotion(0, 1, (Sint16)mouse.x, (Sint16)mouse.y);
349 } 349 }
350 } else if ( SDL_GetAppState() & SDL_APPMOUSEFOCUS ) { 350 } else if ( SDL_GetAppState() & SDL_APPMOUSEFOCUS ) {
351 ScreenToClient(SDL_Window, &mouse); 351 ScreenToClient(SDL_Window, &mouse);
352 #ifdef SDL_VIDEO_DRIVER_GAPI 352 #ifdef SDL_VIDEO_DRIVER_GAPI
353 if (SDL_VideoSurface && this->hidden->gapiInfo) 353 if (SDL_VideoSurface && this->hidden->gapiInfo)
354 GapiTransform(this->hidden->gapiInfo, &mouse.x, &mouse.y); 354 GapiTransform(this->hidden->gapiInfo, &mouse.x, &mouse.y);
355 #endif 355 #endif
356 posted = SDL_PrivateMouseMotion(0, 0, mouse.x, mouse.y); 356 posted = SDL_PrivateMouseMotion(0, 0, (Sint16)mouse.x, (Sint16)mouse.y);
357 } 357 }
358 } 358 }
359 359
360 void DIB_PumpEvents(_THIS) 360 void DIB_PumpEvents(_THIS)
361 { 361 {