diff options
| author | ayuanx <ayuanx@gmail.com> | 2009-12-08 19:58:19 +0000 |
|---|---|---|
| committer | ayuanx <ayuanx@gmail.com> | 2009-12-08 19:58:19 +0000 |
| commit | 48896c7de226691c034056625f6406dc6fa7b3e7 (patch) | |
| tree | 6b606b2c93f3b51fc3ced8e7e8df4b69e1a270a2 /Source/Core | |
| parent | 4df6dc24f88baeb8021918ffbeb52543f29f84e2 (diff) | |
1. Fixed a silly bug that prevented IR rotation in last rev from working, now IR rotation works fine, verified.
2. Added Roll Left/Right key mappings for keyboard.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4659 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/InputCommon/Src/Configuration.cpp | 11 | ||||
| -rw-r--r-- | Source/Core/InputCommon/Src/SDL.h | 8 |
2 files changed, 8 insertions, 11 deletions
diff --git a/Source/Core/InputCommon/Src/Configuration.cpp b/Source/Core/InputCommon/Src/Configuration.cpp index 393a9e876a..deb1117cf0 100644 --- a/Source/Core/InputCommon/Src/Configuration.cpp +++ b/Source/Core/InputCommon/Src/Configuration.cpp @@ -55,16 +55,13 @@ namespace InputCommon // ------------- float Deg2Rad(float Deg) { - return Deg * ((float)M_PI / 180.0f); + return Deg * (float)M_PI / 180.0f; } float Rad2Deg(float Rad) { - return (Rad * 180.0f) / (float)M_PI; + return Rad * 180.0f / (float)M_PI; } - - - // Check if the pad is within the dead zone, we assume the range is 0x8000 // ---------------- float CoordinatesToRadius(int x, int y) @@ -107,7 +104,7 @@ int Pad_Convert(int _val) // Convert the range (-0x8000 to 0x7fff) to (0 to 0xffff) _val = 0x8000 +_val; - // Convert the range (-32768 to 32767) to (-128 to 127) + // Convert the range (0 to 0xffff) to (0 to 0xff) _val = _val >> 8; //Console::Print("0x%04x %06i\n\n", _val, _val); @@ -196,7 +193,7 @@ void Square2Circle(int &_x, int &_y, int _pad, std::string SDiagonal, bool Circl /* Calculate the actual distance between the maxium diagonal values, and the outer edges of the square. A diagonal of 85% means a maximum distance of 0.85 * sqrt(2) ~1.2 in the diagonals. */ - float corner_circle_dist = ( Diagonal / sin(Deg2Rad(45)) ); + float corner_circle_dist = ( Diagonal / sin(Deg2Rad(45.0f)) ); float SquareDist = Square2CircleDistance(deg); // The original-to-square distance adjustment float adj_ratio1; diff --git a/Source/Core/InputCommon/Src/SDL.h b/Source/Core/InputCommon/Src/SDL.h index 964a1fe3f9..30f43a94df 100644 --- a/Source/Core/InputCommon/Src/SDL.h +++ b/Source/Core/InputCommon/Src/SDL.h @@ -180,9 +180,9 @@ struct PadAxis }; struct PadWiimote { - int keyForControls[14]; + int keyForControls[16]; // Order is A, B, 1, 2, +, -, Home - // L, R, U, D, Shake, PitchL, PitchR + // L, R, U, D, RollL, RollR, PitchU, PitchD, Shake }; struct PadNunchuck @@ -194,8 +194,8 @@ struct PadClassicController { int keyForControls[23]; // Order is A, B, X, Y, +, -, Home - // Tl, Zl, Zr, Tr, Dl, Du, Dr, Dd - // Ll, Lu, Lr, Ld, Rl, Ru, Rr, Rd + // Tl, Zl, Zr, Tr, Dl, Dr, Du, Dd + // Ll, Lr, Lu, Ld, Rl, Rr, Ru, Rd }; struct PadGH3Controller { |
