Fixed the bug where mouse cursor and SDL mouse coordinates didn't match

in Windows OpenGL mode.
This commit is contained in:
Sam Lantinga 2002-03-31 02:42:43 +00:00
parent 4dc17f059e
commit 3ffc2c0a7d
2 changed files with 3 additions and 6 deletions

View File

@ -48,11 +48,7 @@ static char rcsid =
(strcmp(this->name, "directx") == 0) \
)
#define DINPUT_FULLSCREEN() \
( \
((SDL_VideoSurface->flags & SDL_FULLSCREEN) == SDL_FULLSCREEN) && \
(strcmp(this->name, "directx") == 0) \
)
#define DINPUT_FULLSCREEN() DDRAW_FULLSCREEN()
/* The main window -- and a function to set it for the audio */
extern const char *SDL_Appname;

View File

@ -298,7 +298,8 @@ static void handle_mouse(const int numevents, DIDEVICEOBJECTDATA *ptrbuf)
Uint8 button;
/* If we are in windowed mode, Windows is taking care of the mouse */
if ( ! (SDL_PublicSurface->flags & SDL_FULLSCREEN) ) {
if ( (SDL_PublicSurface->flags & SDL_OPENGL) ||
!(SDL_PublicSurface->flags & SDL_FULLSCREEN) ) {
return;
}