Mercurial > sdl-ios-xcode
comparison src/video/wincommon/SDL_sysevents.c @ 4249:429c8dd3175d SDL-1.2
Fixed bug #713
Don't clamp the mouse coordinates to the video surface size, instead clamp them to the last known window size.
This allows users to get the correct mouse coordinates even if they don't call SDL_SetVideoMode() in response to an SDL_VIDEORESIZE event (used as a hack to retain the OpenGL context on Windows and Linux after a window resize)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 27 Sep 2009 05:18:43 +0000 |
parents | d7294b7c732d |
children | c483b474b1cf |
comparison
equal
deleted
inserted
replaced
4248:a9c6e65c1416 | 4249:429c8dd3175d |
---|---|
418 case WM_XBUTTONDOWN: | 418 case WM_XBUTTONDOWN: |
419 case WM_XBUTTONUP: { | 419 case WM_XBUTTONUP: { |
420 /* Mouse is handled by DirectInput when fullscreen */ | 420 /* Mouse is handled by DirectInput when fullscreen */ |
421 if ( SDL_VideoSurface && ! DINPUT() ) { | 421 if ( SDL_VideoSurface && ! DINPUT() ) { |
422 WORD xbuttonval = 0; | 422 WORD xbuttonval = 0; |
423 Sint16 x, y; | |
424 Uint8 button, state; | 423 Uint8 button, state; |
425 | 424 |
426 /* DJM: | 425 /* DJM: |
427 We want the SDL window to take focus so that | 426 We want the SDL window to take focus so that |
428 it acts like a normal windows "component" | 427 it acts like a normal windows "component" |