]> git.mxchange.org Git - flightgear.git/commitdiff
Added groundwork for reading a joystick name from the latest plib CVS
authordavid <david>
Thu, 18 Apr 2002 20:18:33 +0000 (20:18 +0000)
committerdavid <david>
Thu, 18 Apr 2002 20:18:33 +0000 (20:18 +0000)
code.  It doesn't do anything but print a message, so far.

acconfig.h
src/Input/input.cxx

index 3e31115023f1e59e9e509595e2f3f9c377271597..33bc604f49788fbde9753ada5d51f3e0b87bb2d9 100644 (file)
@@ -67,6 +67,9 @@
 /* Define to avoid Christian's new weather code */
 #undef FG_NEW_ENVIRONMENT
 
+/* Define to enable new Plib joystick features (post 1.4) */
+#undef FG_PLIB_JOYSTICK_GETNAME
+
 /* Define to use old mouse support */
 #undef FG_OLD_MOUSE
    
index 18983b4ecf9955a8d856da4fee147396d90ebf5a..be9c1255d2f5ad14d2801bef765c979b2296e042 100644 (file)
@@ -483,6 +483,11 @@ FGInput::_init_joystick ()
     if (js->notWorking()) {
       SG_LOG(SG_INPUT, SG_WARN, "Joystick " << i << " not found");
       continue;
+    } else {
+#ifdef FG_PLIB_JOYSTICK_GETNAME
+      SG_LOG(SG_INPUT, SG_INFO, "");
+      SG_LOG(SG_INPUT, SG_INFO, "Found joystick " << js->getName());
+#endif
     }
 #ifdef WIN32
     JOYCAPS jsCaps ;