![]() |
SDL_ShowCursor | ![]() |
julien CLEMENT
Guest
![]() |
![]() |
On Mac OS 10.5, I can't hide the mouse cursor
with SDL_ShowCursor(0). I've tried SDL_SelectMouse(0) before and it's the same. Julien _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
||||||||||
|
![]() |
![]() |
![]() |
![]() |
hardcoder
![]() |
![]() |
I have the same problem under Vista, is this code only solution?
|
||||||||||
|
![]() |
![]() |
greenrat
![]() |
![]() |
hmmm I'm use XP, use this
|
||||||||||||
|
![]() |
![]() |
Hyejung
![]() |
![]() |
SDL version : SDL 1.3
OS: OSX (leopard/snow leopard) Used: SDL_WINDOW_OPENGL, and cocoa for creating window I wanted to have: full screen without mouse cursor Problem: Original mouse cursor did not hide. (This job is on TODO list for SDL1.3) My temporal solution FOR THE PEOPLE really really need to hide cursor right now: 1. Go to src/video/cocoa 2. Modify SDL_cocoawindow.m I put these lines before return (end of the function).
|
||||||||||||
|
![]() |
Re: SDL_ShowCursor | ![]() |
mandarx
![]() |
![]() |
best regards MandarX |
||||||||||||
|
![]() |
SDL_ShowCursor | ![]() |
zoltan
Guest
![]() |
![]() |
Be careful with that function. At least on Linux and SDL 1.2, if you have
full-screen mode and you turn the cursor *on*, then it will jump to an unpredictable location. There was some discussion about that on the list a year or two ago. The behaviour is actually not a bug, but a feature (with a rather convoluted explanation), but the conclusion was that it was a bad feature. However, it has not been fixed. As a workaround, you should write a little wrapper around SDL_ShowCursor(), something like this: void MyShowCursor( int show ) { int x, y; SDL_GetMouseState( &x, &y ); SDL_ShowCursor( show ? SDL_ENABLE : SDL_DISABLE ); SDL_WarpMouse( x, y ); } Zoltan _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
||||||||||
|
![]() |
![]() |
Hyejung
![]() |
![]() |
SDL version: SDL 1.3
OS: OSX Used : SDL_WINDOW_OPENGL --------------------------------------- You are right. It is nor right to do actually. ![]() I saw that hiding/showing cursor is on TODO list in SDL1.3. But I needed to hide cursor really. So that temporal solution is just for the people really need to hide cursor right now, and don't need to have a function disable/enable mouse cursor. And I will try to wrap it like you suggested. If I do, I will post it again. Thank you. |
||||||||||
|