Problem with SDL_MOUSEBUTTONDOWN

Hi,
I’m new to SDL and like it so far.
I am using vc6.0 in a practise SDL\OpenGL program.

The problem is that with each single mouse click,
I am getting two events. They both happen
within 1 ms of time. (This ends up negating a
toggle variable in my event function). I could of
course filter out the second event, but that seems
inefficient.
Anything obvious I might be overlooking?

Thanks,
Stewart

“Stewart Park” wrote

The problem is that with each single mouse click,
I am getting two events. They both happen
within 1 ms of time. (This ends up negating a
toggle variable in my event function). I could of
course filter out the second event, but that seems
inefficient.
Anything obvious I might be overlooking?

i believe this has all been fixed in the latest cvs version
of SDL. you can grab that or wait for the 1.2.1 release. you
can keep track of SDL changes here;

http://www.libsdl.org/cvs.html

take a look back on April 29

Hi,
I’m new to SDL and like it so far.
I am using vc6.0 in a practise SDL\OpenGL program.

The problem is that with each single mouse click,
I am getting two events. They both happen
within 1 ms of time. (This ends up negating a
toggle variable in my event function). I could of
course filter out the second event, but that seems
inefficient.
Anything obvious I might be overlooking?

Nope, it’s a bug that was fixed in CVS last month:
http://www.libsdl.org/cvs.html

It’ll be fixed in the next release.

See ya!
-Sam Lantinga, Lead Programmer, Loki Software, Inc.