Comment 2 for bug 624740

Revision history for this message
Steve Langasek (vorlon) wrote :

I question the utility of having an exhaustive enum for all of the possible keypresses; I think it makes more sense to just redefine the grEvent struct to use an unsigned short instead of the enum:

Index: ft2demos-2.4.2/graph/grevents.h
===================================================================
--- ft2demos-2.4.2.orig/graph/grevents.h
+++ ft2demos-2.4.2/graph/grevents.h
@@ -106,7 +106,7 @@
   typedef struct grEvent_
   {
     int type;
- grKey key;
+ unsigned short key;
     int x, y;

   } grEvent;

Tested with gcc 4.5, and this appears to work. Do you have an opinion on this?