Wouldn’t be useful, because of the easy of input implementation for games,
to be able to map the mouse and some sort of keyboard keys as joysticks?
Because currently i’m using joystick only, but mostly certain i want to
fallback to mouse and do exactly this for my project itself.
The option of keyboard could set arbitrary buttons and arrows. say arrows +
wasd, arrows + ctrl + shift + space, …
Seems some work but very reusable, and furtherly better yet, would give
consistency to all SDL games joystick fallbacks.
Just dropping it out, in case you are not busy, are you ?
I think it’s feasible but should be implemented as its own library, not in the SDL itself.
I did something that sounds similar a long time ago. I made a class for
abstracting buttons so mouse, keyboard, and joystick buttons could all be
Jonny DOn Tue, May 6, 2014 at 10:31 AM, mr_tawan <mr_tawan at hotmail.com> wrote:
I think it’s feasible but should be implemented as its own library, not
in the SDL itself.
SDL mailing list
SDL at lists.libsdl.org
Cool! Were you be able to register and open a fake/virtual joystick device,
and inject to it the events, so in the event loop there is no special
distinction, or did you need to wrap the joystick API, or else, did you use
a very different approach, if any ;-)?
Seems pretty basic and low level as so it can be core.