comparison src/video/SDL_video.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 3b8ac3d311a2
children d62725f761a1
comparison
equal deleted inserted replaced
4248:a9c6e65c1416 4249:429c8dd3175d
637 } 637 }
638 638
639 /* Reset the keyboard here so event callbacks can run */ 639 /* Reset the keyboard here so event callbacks can run */
640 SDL_ResetKeyboard(); 640 SDL_ResetKeyboard();
641 SDL_ResetMouse(); 641 SDL_ResetMouse();
642 SDL_SetMouseRange(width, height);
642 SDL_cursorstate &= ~CURSOR_USINGSW; 643 SDL_cursorstate &= ~CURSOR_USINGSW;
643 644
644 /* Clean up any previous video mode */ 645 /* Clean up any previous video mode */
645 if ( SDL_PublicSurface != NULL ) { 646 if ( SDL_PublicSurface != NULL ) {
646 SDL_PublicSurface = NULL; 647 SDL_PublicSurface = NULL;