The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL2-Questions/Concerns About Mouse Grabbing...
JeZ-l-Lee


Joined: 20 Sep 2009
Posts: 572
Location: Long Island, New York, United States, Earth
SDL2-Questions/Concerns About Mouse Grabbing...

Hi,

We are working on a new SDL2 2D "Space Invaders" styled game called: "Last Defense II 100%[TM]".
We would like to support mouse input for the second player.
Is SDL2 mouse input grabbing safe?
Can the user still [Alt]+[Tab] out of our game if we grab the mouse?
(would need it to work on both Windows(R) and Linux desktops/notebooks)
Also are both mouse buttons (left/right) available when grabbing the mouse?
(game will have two action buttons)

We plan to support keyboard, 2 x USB gamepads, and hopefully mouse inputs.
Let us know, thanks!
SDL2-Questions/Concerns About Mouse Grabbing...
Bob Rubbens
Guest

I just made a game where in a certain part of it the mouse is grabbed. I'm using SDL2 on windows 7 & 8.1, and it seems to work fine. Both buttons work, the user can alt+tab, and the mouse cursor is invisible when the mouse is grabbed. The only issue I'm having is that sometimes only mousebuttonrelease event is reported, and no mousebuttondown event. I'm suspecting this is because I'm "leaking events" somewhere, but it seems highly unlikely since my code is so simple. Hmmm.


But anyway. Afaik it works as you'd expect.


Regards,


Bob Rubbens


2014-12-11 15:07 GMT+01:00 JeZ-l-Lee:
Quote:
SDL2-Questions/Concerns About Mouse Grabbing...

Hi,

We are working on a new SDL2 2D "Space Invaders" styled game called: "Last Defense II 100%[TM]".
We would like to support mouse input for the second player.
Is SDL2 mouse input grabbing safe?
Can the user still [Alt]+[Tab] out of our game if we grab the mouse?
(would need it to work on both Windows(R) and Linux desktops/notebooks)
Also are both mouse buttons (left/right) available when grabbing the mouse?
(game will have two action buttons)

We plan to support keyboard, 2 x USB gamepads, and hopefully mouse inputs.
Let us know, thanks!



JeZ+Lee
JessePalser <AT> Gmail <DOT> com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org