summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/Configuration.cpp
diff options
context:
space:
mode:
authorayuanx <ayuanx@gmail.com>2009-12-08 19:58:19 +0000
committerayuanx <ayuanx@gmail.com>2009-12-08 19:58:19 +0000
commit48896c7de226691c034056625f6406dc6fa7b3e7 (patch)
tree6b606b2c93f3b51fc3ced8e7e8df4b69e1a270a2 /Source/Core/InputCommon/Src/Configuration.cpp
parent4df6dc24f88baeb8021918ffbeb52543f29f84e2 (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/InputCommon/Src/Configuration.cpp')
-rw-r--r--Source/Core/InputCommon/Src/Configuration.cpp11
1 files changed, 4 insertions, 7 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;