mirror of
https://github.com/cc65/cc65.git
synced 2025-01-28 15:31:18 +00:00
fix last change
This commit is contained in:
parent
deddb00a3a
commit
939a5ccbc2
@ -5,16 +5,20 @@
|
|||||||
#include <conio.h>
|
#include <conio.h>
|
||||||
#include <joystick.h>
|
#include <joystick.h>
|
||||||
|
|
||||||
#ifdef MOUSE_DRIVER
|
|
||||||
|
#ifdef JOYSTICK_DRIVER
|
||||||
|
|
||||||
/* A statically linked driver was named on the compiler's command line.
|
/* A statically linked driver was named on the compiler's command line.
|
||||||
** Make sure that it is used instead of a dynamic one.
|
** Make sure that it is used instead of a dynamic one.
|
||||||
*/
|
*/
|
||||||
# undef DYN_DRV
|
# undef DYN_DRV
|
||||||
# define DYN_DRV 0
|
# define DYN_DRV 0
|
||||||
#endif
|
#else
|
||||||
|
|
||||||
#if defined(__NES__) || defined(__ATARI5200__)
|
/* Use a dynamically loaded driver, by default. */
|
||||||
#define NO_OSERROR
|
# ifndef DYN_DRV
|
||||||
|
# define DYN_DRV 1
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -26,15 +30,15 @@ int main (void)
|
|||||||
|
|
||||||
#if DYN_DRV
|
#if DYN_DRV
|
||||||
unsigned char Res = joy_load_driver (joy_stddrv);
|
unsigned char Res = joy_load_driver (joy_stddrv);
|
||||||
#elif defined(MOUSE_DRIVER)
|
#elif defined(JOYSTICK_DRIVER)
|
||||||
unsigned char Res = joy_install (&MOUSE_DRIVER);
|
unsigned char Res = joy_install (&JOYSTICK_DRIVER);
|
||||||
#else
|
#else
|
||||||
unsigned char Res = joy_install (&joy_static_stddrv);
|
unsigned char Res = joy_install (&joy_static_stddrv);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (Res != JOY_ERR_OK) {
|
if (Res != JOY_ERR_OK) {
|
||||||
cprintf ("Error in joy_load_driver: %u\r\n", Res);
|
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));
|
cprintf ("os: %u, %s\r\n", _oserror, _stroserror (_oserror));
|
||||||
#endif
|
#endif
|
||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user