From: david Date: Thu, 18 Apr 2002 20:18:33 +0000 (+0000) Subject: Added groundwork for reading a joystick name from the latest plib CVS X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4c30ccf2d417ba8d497b960edd84804308feff14;p=flightgear.git Added groundwork for reading a joystick name from the latest plib CVS code. It doesn't do anything but print a message, so far. --- diff --git a/acconfig.h b/acconfig.h index 3e3111502..33bc604f4 100644 --- a/acconfig.h +++ b/acconfig.h @@ -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 diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 18983b4ec..be9c1255d 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -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 ;