From: Christian Groessler Date: Mon, 2 Jun 2014 06:41:35 +0000 (+0200) Subject: fix last change X-Git-Tag: V2.15~53^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=939a5ccbc2bb29b12f71f2a81206464ec46b0434;p=cc65 fix last change --- diff --git a/testcode/lib/joy-test.c b/testcode/lib/joy-test.c index bea8be718..0a5c80902 100644 --- a/testcode/lib/joy-test.c +++ b/testcode/lib/joy-test.c @@ -5,16 +5,20 @@ #include #include -#ifdef MOUSE_DRIVER + +#ifdef JOYSTICK_DRIVER + /* A statically linked driver was named on the compiler's command line. ** Make sure that it is used instead of a dynamic one. */ # undef DYN_DRV # define DYN_DRV 0 -#endif +#else -#if defined(__NES__) || defined(__ATARI5200__) -#define NO_OSERROR +/* Use a dynamically loaded driver, by default. */ +# ifndef DYN_DRV +# define DYN_DRV 1 +# endif #endif @@ -26,15 +30,15 @@ int main (void) #if DYN_DRV unsigned char Res = joy_load_driver (joy_stddrv); -#elif defined(MOUSE_DRIVER) - unsigned char Res = joy_install (&MOUSE_DRIVER); +#elif defined(JOYSTICK_DRIVER) + unsigned char Res = joy_install (&JOYSTICK_DRIVER); #else unsigned char Res = joy_install (&joy_static_stddrv); #endif if (Res != JOY_ERR_OK) { cprintf ("Error in joy_load_driver: %u\r\n", Res); -#ifndef NO_OSERROR +#if DYN_DRV cprintf ("os: %u, %s\r\n", _oserror, _stroserror (_oserror)); #endif exit (EXIT_FAILURE);