Advertisement

SDL_ShowCursor in OSX

Started by December 03, 2004 12:30 PM
2 comments, last by FruitJuice27 20 years, 2 months ago
I am using VC++6 for win and Xcode for OSX. Im going Fullscreen with openGL and using SDL_ShowCursor(SDL_DISABLE) so that my SDL mouse event gives me relative X and Y movements from the mouse even though the cursor might be stopped by the edges of the screen. This works fine when compiling and run in Windows. However in OSX the cursor only dissapears after approx. 1 second after my openGL window is displayed and then my relative mouse movement data stops when the hidden cursor encounters the edges of the screen. Anyone else experience this? Any ideas? Thanks, Fruit [Edited by - FruitJuice27 on December 3, 2004 1:21:17 PM]
In general, if you are using relitave coordinates, it is a better idea to go fullscreen.

I guess it is a platform specific issue.
HxRender | Cornerstone SDL TutorialsCurrently picking on: Hedos, Programmer One
Advertisement
I am going fullscreen. I edited my origional post.

[Edited by - FruitJuice27 on December 3, 2004 1:20:16 PM]
UPDATE and fix:

Thanks to Sam for this!!

You need to use SDL_WM_GrabInput(). In order to ger continuous relative motion
you need to grab the cursor, as well as hide it. The fact that this
happens to work (just using SDL_ShowCursor(SDL_DISABLE)) on Windows is a quirk of the platform.

This topic is closed to new replies.

Advertisement