Index: content/browser/gamepad/gamepad_standard_mappings.h |
diff --git a/content/browser/gamepad/gamepad_standard_mappings.h b/content/browser/gamepad/gamepad_standard_mappings.h |
index 6b533ca5829c01139e70ac73145613772e14c766..7c2c10c20357e41a2cc8cc0ad69ab71ae4ec4154 100644 |
--- a/content/browser/gamepad/gamepad_standard_mappings.h |
+++ b/content/browser/gamepad/gamepad_standard_mappings.h |
@@ -6,10 +6,7 @@ |
#define CONTENT_BROWSER_GAMEPAD_GAMEPAD_STANDARD_MAPPINGS_H_ |
#include "base/strings/string_piece.h" |
- |
-namespace blink { |
-class WebGamepad; |
-} |
+#include "content/common/gamepad_hardware_buffer.h" |
namespace content { |
@@ -56,6 +53,15 @@ enum CanonicalAxisIndex { |
kNumAxes |
}; |
+// Matches XInput's trigger deadzone |
+const float kDefaultButtonPressedThreshold = 30.f/255.f; |
+ |
+// Common mapping functions |
+blink::WebGamepadButton AxisToButton(float input); |
+blink::WebGamepadButton AxisNegativeAsButton(float input); |
+blink::WebGamepadButton AxisPositiveAsButton(float input); |
+void DpadFromAxis(blink::WebGamepad* mapped, float dir); |
+ |
} // namespace content |
#endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_STANDARD_MAPPINGS_H_ |