- Enabled Half press for shoulder buttons
- Added a option to select controller type
- Normal controllers should use the default joystick
- Some joysticks dont have a real hat (POV) but fake this with buttons.
In this case Joystick (no hat) should be selected.
After this is selected, four new buttons will appear for the d-pad.
- Next version will probably include keyboard support.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@60 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Laurence Muller
2008-07-23 00:49:20 +00:00
parent a3bae5f132
commit f9582bef30
6 changed files with 227 additions and 40 deletions

View File

@ -59,18 +59,22 @@
struct CONTROLLER_STATE{ // GC PAD INFO/STATE
int buttons[8]; // Amount of buttons (A B X Y Z, L-Trigger R-Trigger Start) might need to change the triggers buttons
int dpad; // 1 HAT (8 directions + neutral)
int dpad2[4]; // d-pad using buttons
int axis[4]; // 2 x 2 Axes (Main & Sub)
int halfpress; // ...
SDL_Joystick *joy; // SDL joystick device
};
struct CONTROLLER_MAPPING{ // GC PAD MAPPING
int buttons[8]; // Amount of buttons (A B X Y Z, L-Trigger R-Trigger Start) might need to change the triggers buttons
int dpad; // 1 HAT (8 directions + neutral)
int dpad2[4]; // d-pad using buttons
int axis[4]; // 2 x 2 Axes (Main & Sub)
int enabled; // Pad attached?
int deadzone; // Deadzone... what else?
int halfpress; // Not implemented
int halfpress; // Halfpress... you know, like not fully pressed ;)...
int ID; // SDL joystick device ID
int controllertype; // Joystick, Joystick no hat or a keyboard (perhaps a mouse later)
};
struct CONTROLLER_INFO{ // CONNECTED WINDOWS DEVICES INFO
@ -100,9 +104,23 @@ enum
CTL_X_BUTTON,
CTL_Y_BUTTON,
CTL_Z_TRIGGER,
CTL_START
CTL_START
};
enum
{
CTL_TYPE_JOYSTICK = 0,
CTL_TYPE_JOYSTICK_NO_HAT,
CTL_TYPE_KEYBOARD
};
enum
{
CTL_D_PAD_UP = 0,
CTL_D_PAD_DOWN,
CTL_D_PAD_LEFT,
CTL_D_PAD_RIGHT
};
//////////////////////////////////////////////////////////////////////////////////////////
// Custom Functions
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>