comparison src/video/windib/SDL_dibevents.c @ 4350:4988a4f76a09 SDL-1.2

Fixed bug #849 This was a silly bug. :)
author Sam Lantinga <slouken@libsdl.org>
date Sat, 17 Oct 2009 16:49:23 +0000
parents 6cc2b35ac610
children 6800e2560310
comparison
equal deleted inserted replaced
4349:471dac4b41dd 4350:4988a4f76a09
345 mouse.y -= 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, (Sint16)mouse.x, (Sint16)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 {
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
366 TranslateMessage(&msg); 366 TranslateMessage(&msg);
367 DispatchMessage(&msg); 367 DispatchMessage(&msg);
368 } 368 }
369 } 369 }
370 370
371 if ( SDL_GetAppState() & SDL_APPINPUTFOCUS ) { 371 if ( SDL_GetAppState() & SDL_APPMOUSEFOCUS ) {
372 DIB_GenerateMouseMotionEvent( this ); 372 DIB_GenerateMouseMotionEvent( this );
373 } 373 }
374 } 374 }
375 375
376 static HKL hLayoutUS = NULL; 376 static HKL hLayoutUS = NULL;