Skip to content
Permalink
Browse files

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

in Windows OpenGL mode.
  • Loading branch information
slouken committed Mar 31, 2002
1 parent 4927029 commit 874a58506b63a5084302a67632a540a85f3ab199
Showing with 3 additions and 6 deletions.
  1. +1 −5 src/video/wincommon/SDL_lowvideo.h
  2. +2 −1 src/video/windx5/SDL_dx5events.c
@@ -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;
@@ -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;
}

0 comments on commit 874a585

Please sign in to comment.