1
0
Fork 0

- no longer include Joystick/joystick.hxx

- include Input/input.hxx
- register GLUTkeyup and GLUTspecialkeyup with glut
- comment out call to fgJoystickRead
- comment out call to fgJoystickInit
- add call to FGInput::update to replace fgJoystickRead
This commit is contained in:
curt 2001-06-04 21:08:06 +00:00
parent c9616e8c10
commit 96be3ad601

View file

@ -81,7 +81,7 @@
#include <FDM/UIUCModel/uiuc_aircraftdir.h> #include <FDM/UIUCModel/uiuc_aircraftdir.h>
#include <GUI/gui.h> #include <GUI/gui.h>
#include <GUI/sgVec3Slider.hxx> #include <GUI/sgVec3Slider.hxx>
#include <Joystick/joystick.hxx> // #include <Joystick/joystick.hxx>
#ifdef FG_NETWORK_OLK #ifdef FG_NETWORK_OLK
#include <NetworkOLK/network.h> #include <NetworkOLK/network.h>
#endif #endif
@ -98,6 +98,8 @@
#include <Time/sunpos.hxx> #include <Time/sunpos.hxx>
#include <Time/tmp.hxx> #include <Time/tmp.hxx>
#include <Input/input.hxx>
// begin - added Venky // begin - added Venky
// $$$ begin - added VS Renganathan // $$$ begin - added VS Renganathan
#include <simgear/misc/sgstream.hxx> #include <simgear/misc/sgstream.hxx>
@ -717,6 +719,9 @@ void fgRenderFrame( void ) {
// glDisable( GL_CULL_FACE ); // glDisable( GL_CULL_FACE );
// glDisable( GL_TEXTURE_2D ); // glDisable( GL_TEXTURE_2D );
// update the input subsystem
current_input.update();
// update the controls subsystem // update the controls subsystem
controls.update(); controls.update();
@ -901,10 +906,10 @@ static void fgMainLoop( void ) {
#if defined( ENABLE_PLIB_JOYSTICK ) #if defined( ENABLE_PLIB_JOYSTICK )
// Read joystick and update control settings // Read joystick and update control settings
if ( fgGetString("/sim/control-mode") == "joystick" ) // if ( fgGetString("/sim/control-mode") == "joystick" )
{ // {
fgJoystickRead(); // fgJoystickRead();
} // }
#elif defined( ENABLE_GLUT_JOYSTICK ) #elif defined( ENABLE_GLUT_JOYSTICK )
// Glut joystick support works by feeding a joystick handler // Glut joystick support works by feeding a joystick handler
// function to glut. This is taken care of once in the joystick // function to glut. This is taken care of once in the joystick
@ -1342,8 +1347,10 @@ int fgGlutInitEvents( void ) {
glutReshapeFunc( fgReshape ); glutReshapeFunc( fgReshape );
// call GLUTkey() on keyboard event // call GLUTkey() on keyboard event
glutKeyboardFunc( GLUTkey ); glutKeyboardFunc(GLUTkey);
glutSpecialFunc( GLUTspecialkey ); glutKeyboardUpFunc(GLUTkeyup);
glutSpecialFunc(GLUTspecialkey);
glutSpecialUpFunc(GLUTspecialkeyup);
// call guiMouseFunc() whenever our little rodent is used // call guiMouseFunc() whenever our little rodent is used
glutMouseFunc ( guiMouseFunc ); glutMouseFunc ( guiMouseFunc );