summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/InputConfig.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2019-03-26 19:31:03 -0500
committerJordan Woyak <jordan.woyak@gmail.com>2019-04-07 09:32:49 -0500
commit5efb717873691fa42447ca0d9d9810b5ad501b42 (patch)
tree4d3f306850c0a1f876489327d7de98ca1c0cba6a /Source/Core/InputCommon/InputConfig.cpp
parent75e74315e69df1dc03bbda4373528e9e26274d7d (diff)
InputCommon: Clean up how numeric settings are handled. Add units of measure to UI. Eliminate hidden magic values of the IR cursor.
Diffstat (limited to 'Source/Core/InputCommon/InputConfig.cpp')
-rw-r--r--Source/Core/InputCommon/InputConfig.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/Core/InputCommon/InputConfig.cpp b/Source/Core/InputCommon/InputConfig.cpp
index 0a6a82d540..a1826f46d1 100644
--- a/Source/Core/InputCommon/InputConfig.cpp
+++ b/Source/Core/InputCommon/InputConfig.cpp
@@ -13,6 +13,7 @@
#include "Core/HW/Wiimote.h"
#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h"
#include "InputCommon/ControllerEmu/ControllerEmu.h"
+#include "InputCommon/ControllerEmu/Setting/NumericSetting.h"
#include "InputCommon/ControllerInterface/ControllerInterface.h"
#include "InputCommon/InputConfig.h"
#include "InputCommon/InputProfile.h"
@@ -81,13 +82,13 @@ bool InputConfig::LoadConfig(bool isGC)
#if defined(ANDROID)
// For use on android touchscreen IR pointer
// Check for IR values
- if (control_section->Exists("IRWidth") && control_section->Exists("IRHeight") &&
- control_section->Exists("IRCenter"))
+ if (control_section->Exists("IRTotalYaw") && control_section->Exists("IRTotalPitch") &&
+ control_section->Exists("IRVerticalOffset"))
{
use_ir_config = true;
- control_section->Get("IRWidth", &ir_values[0]);
- control_section->Get("IRHeight", &ir_values[1]);
- control_section->Get("IRCenter", &ir_values[2]);
+ control_section->Get("IRTotalYaw", &ir_values[0]);
+ control_section->Get("IRTotalPitch", &ir_values[1]);
+ control_section->Get("IRVerticalOffset", &ir_values[2]);
}
#endif
}
@@ -119,9 +120,9 @@ bool InputConfig::LoadConfig(bool isGC)
// Only set for wii pads
if (!isGC && use_ir_config)
{
- config.Set("IR/Width", ir_values[0]);
- config.Set("IR/Height", ir_values[1]);
- config.Set("IR/Center", ir_values[2]);
+ config.Set("IR/Total Yaw", ir_values[0]);
+ config.Set("IR/Total Pitch", ir_values[1]);
+ config.Set("IR/Vertical Offset", ir_values[2]);
}
#endif
controller->LoadConfig(&config);