1
0
Fork 0

Added custom joystick client support so that flight gear can read values

being shipped over from a separate joystick server.
This commit is contained in:
curt 2000-04-19 21:22:16 +00:00
parent f03cfb6b4a
commit 96c20e6532
3 changed files with 13 additions and 7 deletions

View file

@ -41,6 +41,7 @@
#include <Network/nmea.hxx> #include <Network/nmea.hxx>
#include <Network/pve.hxx> #include <Network/pve.hxx>
#include <Network/rul.hxx> #include <Network/rul.hxx>
#include <Network/joyclient.hxx>
#include <Time/timestamp.hxx> #include <Time/timestamp.hxx>
@ -86,6 +87,9 @@ static FGProtocol *parse_port_config( const string& config )
} else if ( protocol == "rul" ) { } else if ( protocol == "rul" ) {
FGRUL *rul = new FGRUL; FGRUL *rul = new FGRUL;
io = rul; io = rul;
} else if ( protocol == "joyclient" ) {
FGJoyClient *joyclient = new FGJoyClient;
io = joyclient;
} else { } else {
return NULL; return NULL;
} }

View file

@ -1292,10 +1292,6 @@ int main( int argc, char **argv ) {
_control87(MCW_EM, MCW_EM); /* defined in float.h */ _control87(MCW_EM, MCW_EM); /* defined in float.h */
#endif #endif
// Initialize ssg (from plib). Needs to come before we do any
// other ssg related stuff
ssgInit();
// set default log levels // set default log levels
fglog().setLogLevels( FG_ALL, FG_INFO ); fglog().setLogLevels( FG_ALL, FG_INFO );
@ -1329,6 +1325,10 @@ int main( int argc, char **argv ) {
exit(-1); exit(-1);
} }
// Initialize ssg (from plib). Needs to come before we do any
// other ssg stuff, but after opengl/glut has been initialized.
ssgInit();
// Initialize the user interface (we need to do this before // Initialize the user interface (we need to do this before
// passing off control to glut and before fgInitGeneral to get our // passing off control to glut and before fgInitGeneral to get our
// fonts !!! // fonts !!!

View file

@ -767,6 +767,8 @@ int fgOPTIONS::parse_option( const string& arg ) {
parse_channel( "pve", arg.substr(6) ); parse_channel( "pve", arg.substr(6) );
} else if ( arg.find( "--rul=" ) != string::npos ) { } else if ( arg.find( "--rul=" ) != string::npos ) {
parse_channel( "rul", arg.substr(6) ); parse_channel( "rul", arg.substr(6) );
} else if ( arg.find( "--joyclient=" ) != string::npos ) {
parse_channel( "joyclient", arg.substr(12) );
#ifdef FG_NETWORK_OLK #ifdef FG_NETWORK_OLK
} else if ( arg == "--disable-network-olk" ) { } else if ( arg == "--disable-network-olk" ) {
network_olk = false; network_olk = false;