[SDL] Re: mouse grabbing

Sam Lantinga slouken at devolution.com
Wed Dec 2 07:29:25 PST 1998


> Hello

>     How can i grab a mouse cursor in windowed SDL
> application ? I looked through the SDL sources and found
> XGrabPointer call only in DGA mode. I see a nice thing will
> be to grab mouse in window while a game is started and
> release it when a game is finished or paused.

Look at the source code to SDLdoom (available on the SDL download page:
	http://www.devolution.com/~slouken/SDL/download.html
i_video.c shows the best way to implement mouse handling under SDL.

See ya!
	-Sam Lantinga				(slouken at devolution.com)

--
Author of Simple DirectMedia Layer -
	http://www.devolution.com/~slouken/SDL/
--



More information about the SDL mailing list