Commit Graph

1 Commits

Author SHA1 Message Date
Robert Osfield
a345a04254 From Wang Rui, "I implemented a customized viewer event traversal here to read state
changes from the DirectInput devices and add events to the event
queue. I've tested with the keyboard and joystick supports. Because of
only having a very old 6-button gamepad, I can't do more experiments.
Hope this will bring more ideas to those who face similar problems,
especially simulation game designers. :)

I didn't map all DirectInput key values to GUIEventAdapter key
symbols. Users may add more in the buildKeyMap() function freely. The
mouse handling operations are also ignored, but will be easily
improved in the same way of creating keyboard and joystick devices.

Please add a line:

FIND_PACKAGE(DirectInput)

in the CMakeLists of root directory. And in the examples/CMakeLists.txt:

IF(DIRECTINPUT_FOUND)
   ADD_SUBDIRECTORY(osgdirectinput)
ENDIF(DIRECTINPUT_FOUND)

DirectX SDK 2009 is used here, but an older version like DX8 should
also work in my opinion.
"
2010-12-13 11:34:33 +00:00