More work. Must press calibrate to figure out the min and max first. Triggers are annoying in Linux, because each is treated as a different axis from 0 to 255. but Windows it's from -255 to 25. It keeps setting the pressed button to the l-Trigger in Linux because of this. Must do more work.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1381 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Sonicadvance1
2008-12-03 02:33:02 +00:00
parent ab36429fb0
commit 395129d2c4
4 changed files with 81 additions and 15 deletions

View File

@ -94,9 +94,20 @@
//////////////////////////////////////////////////////////////////////////////////////////
// Structures
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define MAX_AXISES 12 // If more than 12 is needed. Up it
class sCalibration
{
public:
sCalibration()
{
Min = 0;
Max = 0;
}
Sint16 Min;
Sint16 Max;
}; // Simple Calibration Data
struct CONTROLLER_STATE{ // GC PAD INFO/STATE
int buttons[12]; // Amount of buttons (A B X Y Z, L-Trigger R-Trigger Start) might need to change the triggers buttons
int buttons[12]; // 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 halfpress; // ...
@ -104,7 +115,8 @@ struct CONTROLLER_STATE{ // GC PAD INFO/STATE
};
struct CONTROLLER_MAPPING{ // GC PAD MAPPING
std::string buttons[12]; // Amount of buttons (A B X Y Z, L-Trigger R-Trigger Start) might need to change the triggers buttons
std::string buttons[12];// Amount of buttons (A B X Y Z, L-Trigger R-Trigger Start) might need to change the triggers buttons
sCalibration sData[MAX_AXISES]; // Calibration Data
int dpad; // 1 HAT (8 directions + neutral)
int dpad2[4]; // d-pad using buttons
int enabled; // Pad attached?