Hello,
Using SDL ver 1.1.6 on Win2k in Fullscreen with OpenGL,
all mouse click produces twice each event, like
2 x SDL_MOUSEBUTTONDOWN
2 x SDL_MOUSEBUTTONUP
The strange thing is that it only appear in fullscreen.
I don’t know if it is GL dependent
Has anyone any idea ??
Thanks
Stephane
I looked into this a while ago but I had forgotten it still existed. It
is indeed a bug, but I don’t have a solution. Here’s the results of my
research:—
I’ve noticed that there seems to be a bug where mouse button events are
duplicated
in fullscreen OpenGL mode. This seems to be because the
DIRECTX_FULLSCREEN macro
is giving the wrong value when testing it in the Windows message handler
in SDL_sysevents.c.
#define DIRECTX_FULLSCREEN()
(
((SDL_VideoSurface->flags & SDL_FULLSCREEN) == SDL_FULLSCREEN) &&
((SDL_VideoSurface->flags & SDL_OPENGL) != SDL_OPENGL) &&
(strcmp(this->name, “directx”) == 0)
)
In OpenGL fullscreen mode, both the SDL_FULLSCREEN and SDL_OPENGL flags
are set -
even though the system is still using DirectInput - so this returns
false. Perhaps
a DIRECTX_DIRECTINPUT macro could be defined as:
#define DIRECTX_DIRECTINPUT()
(
((SDL_VideoSurface->flags & SDL_FULLSCREEN) == SDL_FULLSCREEN) &&
(strcmp(this->name, “directx”) == 0)
)
Stephane Magnenat wrote:
Hello,
Using SDL ver 1.1.6 on Win2k in Fullscreen with OpenGL,
all mouse click produces twice each event, like
2 x SDL_MOUSEBUTTONDOWN
2 x SDL_MOUSEBUTTONUP
The strange thing is that it only appear in fullscreen.
I don’t know if it is GL dependent
Has anyone any idea ??
Thanks
Stephane
Ok, I’m happy it’s not my application who is buggy 
Can someone fix this ???
Thanks a lot
Stephane> I looked into this a while ago but I had forgotten it still existed. It
is indeed a bug, but I don’t have a solution. Here’s the results of my
research:
I’ve noticed that there seems to be a bug where mouse button events are
duplicated
in fullscreen OpenGL mode. This seems to be because the
DIRECTX_FULLSCREEN macro
is giving the wrong value when testing it in the Windows message handler
in SDL_sysevents.c.
#define DIRECTX_FULLSCREEN()
(
((SDL_VideoSurface->flags & SDL_FULLSCREEN) == SDL_FULLSCREEN) &&
((SDL_VideoSurface->flags & SDL_OPENGL) != SDL_OPENGL) &&
(strcmp(this->name, “directx”) == 0)
)
In OpenGL fullscreen mode, both the SDL_FULLSCREEN and SDL_OPENGL flags
are set -
even though the system is still using DirectInput - so this returns
false. Perhaps
a DIRECTX_DIRECTINPUT macro could be defined as:
#define DIRECTX_DIRECTINPUT()
(
((SDL_VideoSurface->flags & SDL_FULLSCREEN) == SDL_FULLSCREEN) &&
(strcmp(this->name, “directx”) == 0)
)
Stephane Magnenat wrote:
Hello,
Using SDL ver 1.1.6 on Win2k in Fullscreen with OpenGL,
all mouse click produces twice each event, like
2 x SDL_MOUSEBUTTONDOWN
2 x SDL_MOUSEBUTTONUP
The strange thing is that it only appear in fullscreen.
I don’t know if it is GL dependent
Has anyone any idea ??
Thanks
Stephane