Re: [AD] Number of joystick buttons

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


At 14:26 12/27/2003, you wrote:
> Just to confirm that I myself increased it to 32 and sent a build to the
> guy who reported the problem. He said it was now working well.

Great.  Could you post the diff (even though it is incomplete)?

Here it is.
I modified src/win/wjoyhelp.c as well, including default ASCII
strings to the new buttons.
diff -ur previous/include/allegro/joystick.h current/include/allegro/joystick.h
--- previous/include/allegro/joystick.h	2003-11-09 19:43:08.000000000 +0000
+++ current/include/allegro/joystick.h	2003-12-30 00:05:00.000000000 +0000
@@ -32,7 +32,7 @@
 #define MAX_JOYSTICKS            8
 #define MAX_JOYSTICK_AXIS        3
 #define MAX_JOYSTICK_STICKS      5
-#define MAX_JOYSTICK_BUTTONS     16
+#define MAX_JOYSTICK_BUTTONS     32
 
 
 /* information about a single joystick axis */
diff -ur previous/src/win/wjoyhelp.c current/src/win/wjoyhelp.c
--- previous/src/win/wjoyhelp.c	2003-11-09 19:43:12.000000000 +0000
+++ current/src/win/wjoyhelp.c	2003-12-30 00:05:36.000000000 +0000
@@ -44,7 +44,9 @@
 static char name_hat[] = "hat";
 static char *name_b[MAX_JOYSTICK_BUTTONS] = {
    "B1", "B2", "B3", "B4", "B5", "B6", "B7", "B8",
-   "B9", "B10", "B11", "B12", "B13", "B14", "B15", "B16"
+   "B9", "B10", "B11", "B12", "B13", "B14", "B15", "B16",
+   "B17", "B18", "B19", "B20", "B21", "B22", "B23", "B24",
+   "B25", "B26", "B27", "B28", "B29", "B30", "B31", "B32"
 };
 
 #define JOY_POVFORWARD_WRAP  36000


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