summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2009-02-17 22:48:16 +0000
committerhrydgard <hrydgard@gmail.com>2009-02-17 22:48:16 +0000
commite010ef25da2af624bfd0b0d631cb611c66df3725 (patch)
treedb372ec84843404beab347edc146a138cf0318ab /Source/Core/InputCommon
parentf33997e6867357d0e31cd9ca4e273cf38971f90b (diff)
Clean up access to PowerPC::state. Some warning fixes. Restore hold-tab-to-release-throttle on Windows. Fix some project settings.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2297 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/InputCommon')
-rw-r--r--Source/Core/InputCommon/Src/Configuration.cpp8
-rw-r--r--Source/Core/InputCommon/Src/SDL.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/InputCommon/Src/Configuration.cpp b/Source/Core/InputCommon/Src/Configuration.cpp
index b368a79f87..31e766ff85 100644
--- a/Source/Core/InputCommon/Src/Configuration.cpp
+++ b/Source/Core/InputCommon/Src/Configuration.cpp
@@ -50,11 +50,11 @@ namespace InputCommon
// ŻŻŻŻŻŻŻŻŻŻŻŻŻ
float Deg2Rad(float Deg)
{
- return Deg * (M_PI / 180.0);
+ return Deg * ((float)M_PI / 180.0f);
}
float Rad2Deg(float Rad)
{
- return (Rad * 180.0) / M_PI;
+ return (Rad * 180.0f) / (float)M_PI;
}
/////////////////////////////////////////
@@ -70,7 +70,7 @@ float CoordinatesToRadius(int x, int y)
bool IsDeadZone(float DeadZone, int x, int y)
{
// Get the distance from the center
- float Distance = CoordinatesToRadius(x, y) / 32767.0;
+ float Distance = CoordinatesToRadius(x, y) / 32767.0f;
//Console::Print("%f\n", Distance);
@@ -159,7 +159,7 @@ std::vector<int> Square2Circle(int _x, int _y, int _pad, std::string SDiagonal,
// -----------
// Get the manually configured diagonal distance
int Tmp = atoi (SDiagonal.substr(0, SDiagonal.length() - 1).c_str());
- float Diagonal = Tmp / 100.0;
+ float Diagonal = Tmp / 100.0f;
// First make a perfect square in case we don't have one already
float OrigDist = sqrt( pow((float)_y, 2) + pow((float)_x, 2) ); // Get current distance
diff --git a/Source/Core/InputCommon/Src/SDL.cpp b/Source/Core/InputCommon/Src/SDL.cpp
index 15b552a08d..b3f81fa2f7 100644
--- a/Source/Core/InputCommon/Src/SDL.cpp
+++ b/Source/Core/InputCommon/Src/SDL.cpp
@@ -123,7 +123,7 @@ bool SearchDevices(std::vector<CONTROLLER_INFO> &_joyinfo, int &_NumPads, int &_
if (SDL_JoystickOpened(i)) SDL_JoystickClose(_joyinfo[i].joy);
}
- _NumPads = _joyinfo.size();
+ _NumPads = (int)_joyinfo.size();
return true;
}