From 0f3db24a907f17fee3722cddfe85cb02aa1a5a74 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 6 Jul 2002 18:00:34 +0000 Subject: [PATCH] Patch from Julian Foad: May I offer this patch which will help non-Linux users find their joysticks' names. --- src/Input/js_demo.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Input/js_demo.cxx b/src/Input/js_demo.cxx index 904a4097d..cdce31427 100644 --- a/src/Input/js_demo.cxx +++ b/src/Input/js_demo.cxx @@ -26,9 +26,12 @@ int main ( int, char ** ) t = 0; for ( i = 0; i < Z; i++ ) { useful[i] = ! ( js[i]->notWorking () ); - if ( useful[i] ) + if ( useful[i] ) { t++; - else printf ( "Joystick %i not detected\n", i ) ; +#ifdef FG_PLIB_JOYSTICK_GETNAME + printf ( "Joystick %i: \"%s\"\n", i, js[i]->getName() ) ; +#endif + } else printf ( "Joystick %i not detected\n", i ) ; } if ( t == 0 ) exit ( 1 ) ; -- 2.39.5