| Index: content/browser/gamepad/gamepad_standard_mappings_mac.mm
|
| diff --git a/content/browser/gamepad/gamepad_standard_mappings_mac.mm b/content/browser/gamepad/gamepad_standard_mappings_mac.mm
|
| index af41b4c44bb5f6c07706a3031e15d8d0b0bb253e..1722e571695033976d5b58fdd62007ed5323fd72 100644
|
| --- a/content/browser/gamepad/gamepad_standard_mappings_mac.mm
|
| +++ b/content/browser/gamepad/gamepad_standard_mappings_mac.mm
|
| @@ -4,35 +4,10 @@
|
|
|
| #include "content/browser/gamepad/gamepad_standard_mappings.h"
|
|
|
| -#include "content/common/gamepad_hardware_buffer.h"
|
| -
|
| namespace content {
|
|
|
| namespace {
|
|
|
| -float AxisToButton(float input) {
|
| - return (input + 1.f) / 2.f;
|
| -}
|
| -
|
| -void DpadFromAxis(blink::WebGamepad* mapped, float dir) {
|
| - // Dpad is mapped as a direction on one axis, where -1 is up and it
|
| - // increases clockwise to 1, which is up + left. It's set to a large (> 1.f)
|
| - // number when nothing is depressed, except on start up, sometimes it's 0.0
|
| - // for no data, rather than the large number.
|
| - if (dir == 0.0f) {
|
| - mapped->buttons[kButtonDpadUp] = 0.f;
|
| - mapped->buttons[kButtonDpadDown] = 0.f;
|
| - mapped->buttons[kButtonDpadLeft] = 0.f;
|
| - mapped->buttons[kButtonDpadRight] = 0.f;
|
| - } else {
|
| - mapped->buttons[kButtonDpadUp] = (dir >= -1.f && dir < -0.7f) ||
|
| - (dir >= .95f && dir <= 1.f);
|
| - mapped->buttons[kButtonDpadRight] = dir >= -.75f && dir < -.1f;
|
| - mapped->buttons[kButtonDpadDown] = dir >= -.2f && dir < .45f;
|
| - mapped->buttons[kButtonDpadLeft] = dir >= .4f && dir <= 1.f;
|
| - }
|
| -}
|
| -
|
| void MapperXbox360Gamepad(
|
| const blink::WebGamepad& input,
|
| blink::WebGamepad* mapped) {
|
|
|