OS X mouse motion reversed?

Hi,
When using SDL 1.2.7 for OSX I have noticed that the y coord for
the mouse motion event is the reverse of that for Windows/Linux.

That is, OS X goes window-bottom=0 to window-top=600(for example).
Where as both Windows/Linux go window-top=0 to window-bottom=600.

Now this isn’t to much of a problem to get around, I’m guess I just need to do:

#ifdef OSX
pos_y = 600-motion.y
#else
pos_y = motion.y

However I thought these sort of platform specific differences in the SDL
library should be hidden to me? No?

Hence my question is; is there something I’m missing? or should I just
go with the above code?

Thanks,
Aisha

Hi,
When using SDL 1.2.7 for OSX I have noticed that the
y coord for
the mouse motion event is the reverse of that for
Windows/Linux.

Are you running Panther and is your program using
OpenGL in windowed mode (not fullscreen)? If so, this
is a known bug in SDL. I helped submit a few patches
to fix this problem. Try using the CVS version
instead.

-Eric> From: Aisha Fenton

Are you running Panther and is your program using
OpenGL in windowed mode (not fullscreen)? If so, this
is a known bug in SDL.

Yes, Panther using OpenGL in windowed mode.
Thanks for your help, you saved me hacking my
code to bits :slight_smile: