Re: [AD] Problems with keyboard

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


> One solution is definining _INPUT_H after <linux/keyboard.h>:

It seems to me that this can be dangerous, couldn't it? That header file 
must be included for a reason, and this way it effeicively isn't included 
at all.

> Other solution is moving these includes to the top of the file, so
> Allegro will overwrite the original Linux definitions.

This sounds like a good idea anyway.

> But there are
> another thing: You know that gcc doesn't like redefinitions, but gcc
> doesn't warn me about that <linux/input.h> redefines Allegro KEY_*
> macros, but the inverse isn't true, gcc warn me when Allegro redefines
> <linux/input.h> macros. How linux headers can disable the warning?

Maybe there are #ifdef stuff/#undef stuff pairs somewhere?
This brings me to a different idea: how about only defining the Allegro 
constants if the system doesn't define its own? I have no idea if this 
could work or not, but this may also reduce the pain of some of the issues 
with the current keyboard driver (don't know, really. Shot in the dark).

Alternatively, as a solution I would propose a punch of #ifdef/#undef pairs 
for the key combinations Allegro wants to define itself.

Evert





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