comparison src/joystick/linux/SDL_sysjoystick.c @ 1305:babc963b6f8d

Reverted in favor of this one: https://bugzilla.libsdl.org/attachment.cgi?id=3
author Sam Lantinga <slouken@libsdl.org>
date Tue, 31 Jan 2006 18:08:33 +0000
parents 94643e9bad18
children c9b51268668f
comparison
equal deleted inserted replaced
1304:0175d3eeae89 1305:babc963b6f8d
86 /* +23 */ 86 /* +23 */
87 /* MP-8800 button map - map to {logical joystick #, logical button #} */ 87 /* MP-8800 button map - map to {logical joystick #, logical button #} */
88 {0,0},{0,1},{0,2},{0,3},{0,4},{0,5},{0,6},{0,7},{0,8},{0,9},{0,10},{0,11}, 88 {0,0},{0,1},{0,2},{0,3},{0,4},{0,5},{0,6},{0,7},{0,8},{0,9},{0,10},{0,11},
89 {1,0},{1,1},{1,2},{1,3},{1,4},{1,5},{1,6},{1,7},{1,8},{1,9},{1,10},{1,11}, 89 {1,0},{1,1},{1,2},{1,3},{1,4},{1,5},{1,6},{1,7},{1,8},{1,9},{1,10},{1,11},
90 {2,0},{2,1},{2,2},{2,3},{2,4},{2,5},{2,6},{2,7},{2,8},{2,9},{2,10},{2,11}, 90 {2,0},{2,1},{2,2},{2,3},{2,4},{2,5},{2,6},{2,7},{2,8},{2,9},{2,10},{2,11},
91 {3,0},{3,1},{3,2},{3,3},{3,4},{3,5},{3,6},{3,7},{3,8},{3,9},{3,10},{3,11}, 91 {3,0},{3,1},{3,2},{3,3},{3,4},{3,5},{3,6},{3,7},{3,8},{3,9},{3,10},{3,11}
92
93 /* +71 */
94 /* MP-8866 axes map - map to {logical joystick #, logical axis#} */
95 {0,0},{0,1},{0,2},{0,3},
96 {1,0},{1,1},{1,2},{1,3},
97
98 /* +79 */
99 /* MP-8866 hat map - map to {logical joystick #, logical hat #} */
100 {0,0},{1,0},
101
102 /* +81 */
103 /* MP-8866 button map - map to {logical joystick #, logical button #} */
104 {0,0},{0,1},{0,2},{0,3},{0,4},{0,5},{0,6},{0,7},{0,8},{0,9},{0,10},{0,11},
105 {1,0},{1,1},{1,2},{1,3},{1,4},{1,5},{1,6},{1,7},{1,8},{1,9},{1,10},{1,11}
106 }; 92 };
107 93
108 static struct joystick_logical_layout { 94 static struct joystick_logical_layout {
109 int naxes; 95 int naxes;
110 int nhats; 96 int nhats;
111 int nballs; 97 int nballs;
112 int nbuttons; 98 int nbuttons;
113 } joystick_logical_layout[] = { 99 } joystick_logical_layout[] = {
114 /* +0 */
115 /* MP-8800 logical layout */ 100 /* MP-8800 logical layout */
116 {5, 1, 0, 12}, 101 {5, 1, 0, 12},
117 {5, 1, 0, 12}, 102 {5, 1, 0, 12},
118 {5, 1, 0, 12}, 103 {5, 1, 0, 12},
119 {4, 1, 0, 12}, 104 {4, 1, 0, 12}
120 /* +4 */
121 /* MP-8866 logical layout */
122 {4, 1, 0, 12},
123 {4, 1, 0, 12}
124 }; 105 };
125
126 106
127 /* 107 /*
128 Some USB HIDs show up as a single joystick even though they actually 108 Some USB HIDs show up as a single joystick even though they actually
129 control 2 or more joysticks. This array sets up a means of mapping 109 control 2 or more joysticks. This array sets up a means of mapping
130 a single physical joystick to multiple logical joysticks. (djm) 110 a single physical joystick to multiple logical joysticks. (djm)
148 struct joystick_logical_values *buttons; 128 struct joystick_logical_values *buttons;
149 129
150 } joystick_logicalmap[] = { 130 } joystick_logicalmap[] = {
151 {"WiseGroup.,Ltd MP-8800 Quad USB Joypad", 4, joystick_logical_layout, 131 {"WiseGroup.,Ltd MP-8800 Quad USB Joypad", 4, joystick_logical_layout,
152 joystick_logical_values, joystick_logical_values+19, NULL, 132 joystick_logical_values, joystick_logical_values+19, NULL,
153 joystick_logical_values+23}, 133 joystick_logical_values+23}
154 /* WiseGroup MP-8866 Dual USB Joypad */
155 {"0925:8866", 2, joystick_logical_layout+4,
156 joystick_logical_values+71, joystick_logical_values+79, NULL,
157 joystick_logical_values+81}
158
159 }; 134 };
160 135
161 /* find the head of a linked list, given a point in it 136 /* find the head of a linked list, given a point in it
162 */ 137 */
163 #define SDL_joylist_head(i, start)\ 138 #define SDL_joylist_head(i, start)\