]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/joyclient.cxx
Merge branch 'next' into durk-atc
[flightgear.git] / src / Network / joyclient.cxx
index 419c8a41741490f604823261c794884862b66866..b163cb00ee69b175341d1d9c27c75438e04315fe 100644 (file)
@@ -2,7 +2,7 @@
 //
 // Written by Curtis Olson, started April 2000.
 //
-// Copyright (C) 2000  Curtis L. Olson - curt@flightgear.org
+// Copyright (C) 2000  Curtis L. Olson - http://www.flightgear.org/~curt
 //
 // This program is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
 
 #include <simgear/debug/logstream.hxx>
 #include <simgear/io/iochannel.hxx>
 
-#include <Aircraft/aircraft.hxx>
+#include <Aircraft/controls.hxx>
+#include <Main/globals.hxx>
 
 #include "joyclient.hxx"
 
@@ -82,8 +86,8 @@ bool FGJoyClient::process() {
                if ( fabs(elevator) < 0.05 ) {
                    elevator = 0.0;
                }
-               controls.set_aileron( aileron );
-               controls.set_elevator( -elevator );
+               globals->get_controls()->set_aileron( aileron );
+               globals->get_controls()->set_elevator( -elevator );
            }
        } else {
            while ( io->read( (char *)(& buf), length ) == length ) {
@@ -100,8 +104,8 @@ bool FGJoyClient::process() {
                if ( fabs(elevator) < 0.05 ) {
                    elevator = 0.0;
                }
-               controls.set_aileron( aileron );
-               controls.set_elevator( -elevator );
+               globals->get_controls()->set_aileron( aileron );
+               globals->get_controls()->set_elevator( -elevator );
            }
        }
     }