[osg-users] Joystick support in OSG
Elias Tarasov
elias.tarasov at gmail.com
Fri Nov 6 00:15:23 PST 2015
Hello!
To solve abovementioned task i searched for examples into OSG's projects: present3D app, osgviewerSDL example and sdl plugin.
Also, i looked into these docs: https://www.libsdl.org/release/SDL-1.2.15/docs/html/guideinput.html
Eventually i came up with that code: https://drive.google.com/file/d/0ByDDImhSolf6MDYzMllhd0xFTkE/view?usp=sharing
My joystick is successfully recognized by SDL.
Numbers of buttons, axes, and hats are returned correctly.
However, expression
Code:
auto ifEventExists = SDL_PollEvent(&jevent);
always returns zero, which means not a single one input event exists.
So i've never been able to pass into
Code:
switch (jevent.type) {
....
}
section.
Could anybody being familiar with SDL help with that issue?
Thank you!
Cheers,
Elias
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=65558#65558
More information about the osg-users
mailing list