Sign in to follow this  
FruitJuice27

SDL_ShowCursor in OSX

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this