From 4c30ccf2d417ba8d497b960edd84804308feff14 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 18 Apr 2002 20:18:33 +0000 Subject: [PATCH] Added groundwork for reading a joystick name from the latest plib CVS code. It doesn't do anything but print a message, so far. --- acconfig.h | 3 +++ src/Input/input.cxx | 5 +++++ 2 files changed, 8 insertions(+) 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 ; -- 2.39.5