Fix joystick driver. Add interruptor support.
Note that the joystick driver doesn't support combined movements (like left/up or right/down). This should be fixed.
This commit is contained in:
@@ -46,7 +46,7 @@ int main (void)
|
||||
|
||||
clrscr ();
|
||||
count = joy_count ();
|
||||
#ifdef __ATARI5200__
|
||||
#if defined(__ATARI5200__) || defined(__CREATIVISION__)
|
||||
cprintf ("JOYSTICKS: %d", count);
|
||||
#else
|
||||
cprintf ("Driver supports %d joystick(s)", count);
|
||||
@@ -55,13 +55,13 @@ int main (void)
|
||||
for (i = 0; i < count; ++i) {
|
||||
gotoxy (0, i+1);
|
||||
j = joy_read (i);
|
||||
#ifdef __ATARI5200__
|
||||
#if defined(__ATARI5200__) || defined(__CREATIVISION__)
|
||||
cprintf ("%1d:%-3s%-3s%-3s%-3s%-3s%-3s",
|
||||
i,
|
||||
(j & joy_masks[JOY_UP])? " U " : " u ",
|
||||
(j & joy_masks[JOY_DOWN])? " D " : " d ",
|
||||
(j & joy_masks[JOY_LEFT])? " L " : " l ",
|
||||
(j & joy_masks[JOY_RIGHT])? " R " : " r ",
|
||||
(j & joy_masks[JOY_UP])? " U " : " ",
|
||||
(j & joy_masks[JOY_DOWN])? " D " : " ",
|
||||
(j & joy_masks[JOY_LEFT])? " L " : " ",
|
||||
(j & joy_masks[JOY_RIGHT])? " R " : " ",
|
||||
(j & joy_masks[JOY_FIRE])? " 1 " : " ",
|
||||
(j & joy_masks[JOY_FIRE2])? " 2 " : " ");
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user