summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2016-07-11 19:35:32 +0200
committerLéo Lam <leo@innovatetechnologi.es>2016-07-12 11:42:18 +0200
commit5e829f45271bcd6a13ff541308c1599fb8eb2cfd (patch)
tree5bd788d0478c1f042cac2e9c4de63b1b0c22acb1 /Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp
parent7530a2d2069a76aa65640ac97755d75871359a46 (diff)
ControllerEmu: Split the Setting class
The Setting class was used for both numeric values and booleans, and other parts of the code had hacks to make it work with booleans. By splitting Setting into NumericSetting and BooleanSetting, it is clear which settings are numeric, and which are boolean, so there is no need to guess by checking the default values or anything like that. Also, booleans are stored as booleans in config files, instead of 1.0.
Diffstat (limited to 'Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp')
-rw-r--r--Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp b/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp
index 3f1d0e18e7..13dcea4e2f 100644
--- a/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp
+++ b/Source/Core/DolphinWX/InputConfigDiagBitmaps.cpp
@@ -228,7 +228,7 @@ static void DrawControlGroupBox(wxDC& dc, ControlGroupBox* g)
{
// deadzone circle
dc.SetBrush(*wxLIGHT_GREY_BRUSH);
- dc.DrawCircle(32, 32, g->control_group->settings[SETTING_DEADZONE]->value * 32);
+ dc.DrawCircle(32, 32, g->control_group->numeric_settings[SETTING_DEADZONE]->GetValue() * 32);
}
// raw dot
@@ -259,7 +259,7 @@ static void DrawControlGroupBox(wxDC& dc, ControlGroupBox* g)
{
ControlState raw_dot[3];
ControlState adj_dot[3];
- const ControlState deadzone = g->control_group->settings[0]->value;
+ const ControlState deadzone = g->control_group->numeric_settings[0]->GetValue();
// adjusted
((ControllerEmu::Force*)g->control_group)->GetState(adj_dot);
@@ -358,7 +358,7 @@ static void DrawControlGroupBox(wxDC& dc, ControlGroupBox* g)
// draw the shit
dc.SetPen(*wxGREY_PEN);
- ControlState deadzone = g->control_group->settings[0]->value;
+ ControlState deadzone = g->control_group->numeric_settings[0]->GetValue();
ControlState* const trigs = new ControlState[trigger_count];
((ControllerEmu::Triggers*)g->control_group)->GetState(trigs);
@@ -398,7 +398,7 @@ static void DrawControlGroupBox(wxDC& dc, ControlGroupBox* g)
// draw the shit
dc.SetPen(*wxGREY_PEN);
- ControlState thresh = g->control_group->settings[0]->value;
+ ControlState thresh = g->control_group->numeric_settings[0]->GetValue();
for (unsigned int n = 0; n < trigger_count; ++n)
{
@@ -428,7 +428,7 @@ static void DrawControlGroupBox(wxDC& dc, ControlGroupBox* g)
break;
case GROUP_TYPE_SLIDER:
{
- const ControlState deadzone = g->control_group->settings[0]->value;
+ const ControlState deadzone = g->control_group->numeric_settings[0]->GetValue();
ControlState state = g->control_group->controls[1]->control_ref->State() -
g->control_group->controls[0]->control_ref->State();