Re: [AD] Triggers under Linux

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


> if you want to know which axis is a trigger, simply go through the SDL mappings and find which two axes correspond to trigger left and trigger right.

You'll get SDL axis index. Allegro, however, work with (stick, axis)
pairs. It's not clear how to translate one to another, especially
since SDL registers axes in different order than Allegro.

> (I don't know how to find the GUID for the joystick but that shouldn't be hard.)

I already ported that part of SDL code to Allegro, but it's not much
use without the rest of SDL, as I learned later.

2015-03-17 15:00 GMT+03:00 Elias Pschernig <elias@xxxxxxxxxx>:
> On Tue, Mar 17, 2015 at 11:59 AM, Max Savenkov <max.savenkov@xxxxxxxxxx>
> wrote:
>>
>> > we could just use SDLs joystick database that way - not using any SDL
>> > code.
>>
>> Can't just use SDL database. They map axis in different ways (this was
>> discussed in forums when I was trying to make controller_db addon).
>>
>
> Oh, can't use it 1:1, but for example if you want to know which axis is a
> trigger, simply go through the SDL mappings and find which two axes
> correspond to trigger left and trigger right. (I don't know how to find the
> GUID for the joystick but that shouldn't be hard.)
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers




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