From 874a58506b63a5084302a67632a540a85f3ab199 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 31 Mar 2002 02:42:43 +0000 Subject: [PATCH] Fixed the bug where mouse cursor and SDL mouse coordinates didn't match in Windows OpenGL mode. --- src/video/wincommon/SDL_lowvideo.h | 6 +----- src/video/windx5/SDL_dx5events.c | 3 ++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/video/wincommon/SDL_lowvideo.h b/src/video/wincommon/SDL_lowvideo.h index 27057b043..83bed364e 100644 --- a/src/video/wincommon/SDL_lowvideo.h +++ b/src/video/wincommon/SDL_lowvideo.h @@ -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; diff --git a/src/video/windx5/SDL_dx5events.c b/src/video/windx5/SDL_dx5events.c index dfc25d07c..dc950002b 100644 --- a/src/video/windx5/SDL_dx5events.c +++ b/src/video/windx5/SDL_dx5events.c @@ -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; }