]> git.sur5r.net Git - cc65/commitdiff
The NES must have the joystick driver linked in. Change by Stefan Haubenthal.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 6 Jan 2009 17:44:20 +0000 (17:44 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 6 Jan 2009 17:44:20 +0000 (17:44 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3905 b7a2c559-68d2-44c3-8de9-860c34a00d81

testcode/lib/joy-test.c

index eacafbbbad5f40b37fb5c49e3d5c7f5691a1d567..e1f44f8e54af5618fd738c4c4f8c461be62bd1b5 100644 (file)
@@ -12,7 +12,12 @@ int main (void)
     unsigned char count;
     unsigned char i;
 
+#ifdef __NES__
+    extern void *co65_joy;
+    unsigned char Res = joy_install (&co65_joy);
+#else
     unsigned char Res = joy_load_driver (joy_stddrv);
+#endif
     if (Res != JOY_ERR_OK) {
                cprintf ("Error in joy_load_driver: %u\r\n", Res);
         cprintf ("os: %u, %s\r\n", _oserror, _stroserror (_oserror));