Re: [AD] win directx Joystick driver

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


In reply to Eric Botcazou <ebotcazou@xxxxxxxxxx>:
>Do you mean providing multiple dlls like dinput1.dll, dinput2.dll, ... ? 
>That's essentially what COM does: you can retrieve from the DirectX 8 
>version of dinput.dll all the previous DirectInput interfaces.
>
>The problem is really at compile time because, whereas COM roughly 
>solves the dynamic interface compatibility problem, the hard-coded data 
>structures are statically tied to a specific DirectX version.

Can we not use something like this, for instance:

struct Allegro_DX3_Interface {
 // ...
};

struct Allegro_DX5_Interface {
 // ...
};

struct Allegro_DX8_Interface {
 // ...
};

#if DIRECTX_VERSION == 3
#define Allegro_DX_Interface Allegro_DX3_Interface
#elif DIRECTX_VERSION == 5
#define Allegro_DX_Interface Allegro_DX5_Interface

and so on...

Bye for now,
-- 
Laurence Withers, lwithers@xxxxxxxxxx
                http://www.lwithers.demon.co.uk/

Attachment: signature.asc
Description: PGP signature



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