summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/Device.h
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2019-11-17 10:42:49 -0600
committerJordan Woyak <jordan.woyak@gmail.com>2020-01-13 16:29:24 -0600
commitf0534cabc6da4a090b61b8723ddddee76b36deb3 (patch)
tree3d855d83287365fd26df10905d58fb2350296e9c /Source/Core/InputCommon/ControllerInterface/Device.h
parent48fd27cdab67061af32f3120534b57d70b23f71e (diff)
ControllerInterface: Exposse DSU client battery level as an input.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Device.h')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Device.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Device.h b/Source/Core/InputCommon/ControllerInterface/Device.h
index a2cf0a329a..e07f4fb16a 100644
--- a/Source/Core/InputCommon/ControllerInterface/Device.h
+++ b/Source/Core/InputCommon/ControllerInterface/Device.h
@@ -22,11 +22,18 @@ namespace ciface
// range, used for periodic haptic effects though often ignored by devices
// TODO: Make this configurable.
constexpr int RUMBLE_PERIOD_MS = 10;
+
// This needs to be at least as long as the longest rumble that might ever be played.
// Too short and it's going to stop in the middle of a long effect.
// Infinite values are invalid for ramp effects and probably not sensible.
constexpr int RUMBLE_LENGTH_MS = 1000 * 10;
+// All inputs (other than accel/gyro) return 1.0 as their maximum value.
+// Battery inputs will almost always be mapped to the "Battery" setting which is a percentage.
+// If someone actually wants to map a battery input to a regular control they can divide by 100.
+// I think this is better than requiring multiplication by 100 for the most common usage.
+constexpr ControlState BATTERY_INPUT_MAX_VALUE = 100.0;
+
namespace Core
{
class Device