summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp
diff options
context:
space:
mode:
authorDolphin Bot <dolphin-emu-bot@users.noreply.github.com>2014-09-03 09:15:51 +0200
committerDolphin Bot <dolphin-emu-bot@users.noreply.github.com>2014-09-03 09:15:51 +0200
commit6e2b873ec1f5c4c404925b9dfbde863fbaec7102 (patch)
tree8f20661ee614db586ac23a700a572e52a140f5ed /Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp
parentdb84a22109fc41e0915aca7cee46d43c11d6d0d8 (diff)
parent5adbc83453d14b23818442f545ceede0e4548196 (diff)
Merge pull request #781 from RachelBryk/ControlState
Change ControlState typedef to double, and change all related floats/dou...
Diffstat (limited to 'Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp')
-rw-r--r--Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp b/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp
index e33e14a53c..9960381e7f 100644
--- a/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp
+++ b/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp
@@ -43,7 +43,7 @@ static void DrawCenteredRectangle(wxDC &dc, int x, int y, int w, int h)
#define COORD_VIS_SIZE 4
-static void DrawCoordinate(wxDC &dc, double x, double y)
+static void DrawCoordinate(wxDC &dc, ControlState x, ControlState y)
{
int xc = VIS_COORD(x);
int yc = VIS_COORD(y);
@@ -60,7 +60,7 @@ static void DrawControlGroupBox(wxDC &dc, ControlGroupBox *g)
{
// this is starting to be a mess combining all these in one case
- double x = 0, y = 0, z = 0;
+ ControlState x = 0, y = 0, z = 0;
switch (g->control_group->type)
{
@@ -103,7 +103,7 @@ static void DrawControlGroupBox(wxDC &dc, ControlGroupBox *g)
dc.SetPen(LightGrayPen);
// polygon offset
- float max
+ ControlState max
, diagonal
, box = 64
, d_of = box / 256.0
@@ -111,18 +111,18 @@ static void DrawControlGroupBox(wxDC &dc, ControlGroupBox *g)
if (g->control_group->name == "Main Stick")
{
- max = (87.0f / 127.0f) * 100;
- diagonal = (55.0f / 127.0f) * 100;
+ max = (87.0 / 127.0) * 100;
+ diagonal = (55.0 / 127.0) * 100;
}
else if (g->control_group->name == "C-Stick")
{
- max = (74.0f / 127.0f) * 100;
- diagonal = (46.0f / 127.0f) * 100;
+ max = (74.0 / 127.0) * 100;
+ diagonal = (46.0 / 127.0) * 100;
}
else
{
- max = (82.0f / 127.0f) * 100;
- diagonal = (58.0f / 127.0f) * 100;
+ max = (82.0 / 127.0) * 100;
+ diagonal = (58.0 / 127.0) * 100;
}
// polygon corners
@@ -153,7 +153,7 @@ static void DrawControlGroupBox(wxDC &dc, ControlGroupBox *g)
// raw dot
{
- float xx, yy;
+ ControlState xx, yy;
xx = g->control_group->controls[3]->control_ref->State();
xx -= g->control_group->controls[2]->control_ref->State();
yy = g->control_group->controls[1]->control_ref->State();
@@ -177,9 +177,9 @@ static void DrawControlGroupBox(wxDC &dc, ControlGroupBox *g)
break;
case GROUP_TYPE_FORCE :
{
- double raw_dot[3];
- double adj_dot[3];
- const float deadzone = g->control_group->settings[0]->value;
+ ControlState raw_dot[3];
+ ControlState adj_dot[3];
+ const ControlState deadzone = g->control_group->settings[0]->value;
// adjusted
((ControllerEmu::Force*)g->control_group)->GetState(adj_dot);
@@ -287,7 +287,7 @@ static void DrawControlGroupBox(wxDC &dc, ControlGroupBox *g)
dc.SetPen(*wxGREY_PEN);
ControlState deadzone = g->control_group->settings[0]->value;
- double* const trigs = new double[trigger_count];
+ ControlState* const trigs = new ControlState[trigger_count];
((ControllerEmu::Triggers*)g->control_group)->GetState(trigs);
for (unsigned int n = 0; n < trigger_count; ++n)
@@ -363,7 +363,7 @@ static void DrawControlGroupBox(wxDC &dc, ControlGroupBox *g)
dc.SetBrush(*wxGREY_BRUSH);
dc.DrawRectangle(31 + state * 30, 0, 2, 14);
- double adj_state;
+ ControlState adj_state;
((ControllerEmu::Slider*)g->control_group)->GetState(&adj_state);
if (state)
{