Skip to content

Commit

Permalink
Fixed the bug where mouse cursor and SDL mouse coordinates didn't match
Browse files Browse the repository at this point in the history
in Windows OpenGL mode.
  • Loading branch information
slouken committed Mar 31, 2002
1 parent 4927029 commit 874a585
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/video/wincommon/SDL_lowvideo.h
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/video/windx5/SDL_dx5events.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 874a585

Please sign in to comment.