Line 45:
Line 45:
=== SDL joystick mapping ===
=== SDL joystick mapping ===
+
+
The Wii controllers are mapped as SDL joysticks 0-3.
+
The gamecube controller ports are mapped as SDL joysticks 4-7.
+
The sticks and axes are mapped this way:
The sticks and axes are mapped this way:
Line 64:
Line 68:
|}
|}
−
Note: Axis 6,7 and 8 are the wiimote itself axis' orientation.
+
Axis 6,7 and 8 are the wiimote itself axis' orientation.
+
+
Triggers give only positive values (0-32678).
+
=== SDL joystick button mapping ===
=== SDL joystick button mapping ===
−
The D-pads on the Wii Remote and the Classic Controller are mapped as a [http://www.libsdl.org/cgi/docwiki.cgi/SDL_JoystickGetHat joystick hat]. Only one hat is reported per joystick, so when Classic Controller is plugged in, the D-pad on the Wii Remote is ignored. As far as orientation, SDL_HAT_UP is the up button on the Wii Remote's D-pad when it's held in horizontal position (with D-pad to the left).
+
The D-pads on the Wii Remote, the Classic Controller and Gamecube controller are mapped as a [http://www.libsdl.org/cgi/docwiki.cgi/SDL_JoystickGetHat joystick hat].
+
+
For Wii, only one hat is reported per joystick, so when Classic Controller is plugged in, the D-pad on the Wii Remote is ignored. As far as orientation, SDL_HAT_UP is the up button on the Wii Remote's D-pad when it's held in horizontal position (with D-pad to the left).
−
The wiimote buttons are mapped this way in SDL:
+
The wiimote and gamecube conntroller buttons are mapped this way in SDL:
{| class="wikitable"
{| class="wikitable"