Re: [AD] joystick override

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2003-07-07, Vincent <Vincent.Penquerch@xxxxxxxxxx> wrote:
> Allows one to select the joystick device in the config file.
> I don't have a joystick, but it picks up the mouse device fine,

You mean you pointed the Allegro joystick driver at your mouse device to
test?

> I'm not sure why it stops as soon as one joystick is found though,
> it means you can't have two joysticks at the same time ? Or is
> it relying on a multiplexing device ?

It loops until it can't find a joystick device, so it looks like it
should work, assuming your joystick devices are consecutively numbered.
I've never tested it with multiple joysticks, though.

Is the patch really necessary?  Probably it wouldn't hurt.

> --- allegro_tarballs/allegro-4.1.11/src/linux/ljoy.c	Mon Jun 30 20:32:35 2003
> +++ allegro_tarballs/allegro-4.1.11-v2/src/linux/ljoy.c	Tue Jul  1 22:30:50 2003
> @@ -49,8 +49,19 @@
>  	char num_axes, num_buttons;
>  	int throttle;
>  	int i, s, a, b;
> +        AL_CONST char *device_path;
>  
> +        set_config_file("/tmp/foo.cfg");

:-)

-- 
王浩禎




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/