[SDL] Locking Mouse

Pete Shinners pete at shinners.org
Wed Aug 22 08:41:01 PDT 2001

> Ok, I will explain what I want to do. I have made my own GUI system using
> SDL+OpenGL. I want when a user presses a button the cursor to remain still
> until the user releases the button (if you have played with the rotate

what you will want to do is likely grab input when the mouse is
pressed. also, if you hide the mouse cursor while input is grabbed
SDL will automatically make sure the mouse doesn't ever hit the
edges of the screen. this would allow you unlimited scrolling in
any direction (sound like what you are after)

More information about the SDL mailing list