11 /* A statically linked driver was named on the compiler's command line.
12 ** Make sure that it is used instead of a dynamic one.
18 /* Use a dynamically loaded driver, by default. */
32 unsigned char Res = joy_load_driver (joy_stddrv);
33 #elif defined(JOYSTICK_DRIVER)
34 unsigned char Res = joy_install (&JOYSTICK_DRIVER);
36 unsigned char Res = joy_install (&joy_static_stddrv);
39 if (Res != JOY_ERR_OK) {
40 cprintf ("Error in joy_load_driver: %u\r\n", Res);
42 cprintf ("os: %u, %s\r\n", _oserror, _stroserror (_oserror));
50 cprintf ("JOYSTICKS: %d", count);
52 cprintf ("Driver supports %d joystick(s)", count);
55 for (i = 0; i < count; ++i) {
59 cprintf ("%1d:%-3s%-3s%-3s%-3s%-3s%-3s",
61 (j & joy_masks[JOY_UP])? " U " : " u ",
62 (j & joy_masks[JOY_DOWN])? " D " : " d ",
63 (j & joy_masks[JOY_LEFT])? " L " : " l ",
64 (j & joy_masks[JOY_RIGHT])? " R " : " r ",
65 (j & joy_masks[JOY_FIRE])? " 1 " : " ",
66 (j & joy_masks[JOY_FIRE2])? " 2 " : " ");
68 cprintf ("%2d: %-6s%-6s%-6s%-6s%-6s%-6s",
70 (j & joy_masks[JOY_UP])? " up " : " ---- ",
71 (j & joy_masks[JOY_DOWN])? " down " : " ---- ",
72 (j & joy_masks[JOY_LEFT])? " left " : " ---- ",
73 (j & joy_masks[JOY_RIGHT])? "right " : " ---- ",
74 (j & joy_masks[JOY_FIRE])? " fire " : " ---- ",
75 (j & joy_masks[JOY_FIRE2])? "fire2 " : " ---- ");