Wiimote: Configure gamepad in Wiimote plugin

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2172 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-02-09 13:10:29 +00:00
parent e8925e43fe
commit 1fbebb4ce1
26 changed files with 1279 additions and 300 deletions

View File

@ -41,6 +41,7 @@
#include <SDL.h> // Externals
#include "Common.h" // Common
#include "ConsoleWindow.h"
////////////////////////////
@ -148,6 +149,34 @@ enum
XI_TRIGGER_L = 0,
XI_TRIGGER_R
};
struct PadAxis
{
int Lx;
int Ly;
int Rx;
int Ry;
int Tl; // Triggers
int Tr;
};
struct CONTROLLER_STATE_NEW // GC PAD INFO/STATE
{
PadAxis Axis; // 6 Axes (Main, Sub, Triggers)
SDL_Joystick *joy; // SDL joystick device
};
struct CONTROLLER_MAPPING_NEW // GC PAD MAPPING
{
PadAxis Axis; // (See above)
bool enabled; // Pad attached?
int deadzone; // Deadzone... what else?
int ID; // SDL joystick device ID
int controllertype; // D-Pad type: Hat or custom buttons
int triggertype; // SDL or XInput trigger
std::string SDiagonal;
bool bSquareToCircle;
};
////////////////////////////
@ -158,6 +187,7 @@ enum
// General functions
bool SearchDevices(std::vector<CONTROLLER_INFO> &_joyinfo, int &NumPads, int &NumGoodPads);
void GetJoyState(CONTROLLER_STATE &_PadState, CONTROLLER_MAPPING _PadMapping, int controller, int NumButtons);
void GetButton(SDL_Joystick*, int,int,int,int, int&,int&,int&,int&,bool&,bool&, bool,bool,bool,bool,bool);
// Value conversion
int Pad_Convert(int _val);