Chromium Code Reviews| Index: content/browser/gamepad/gamepad_standard_mappings_win.cc |
| =================================================================== |
| --- content/browser/gamepad/gamepad_standard_mappings_win.cc (revision 188613) |
| +++ content/browser/gamepad/gamepad_standard_mappings_win.cc (working copy) |
| @@ -78,6 +78,39 @@ |
| mapped->axesLength = 0; |
| } |
| +void MapperLogitechExtreme3DPro( |
| + const WebKit::WebGamepad& input, |
| + WebKit::WebGamepad* mapped) { |
| + *mapped = input; |
| + mapped->buttons[kButtonPrimary] = input.buttons[0]; |
| + mapped->buttons[kButtonSecondary] = input.buttons[1]; |
| + mapped->buttons[kButtonTertiary] = input.buttons[2]; |
| + mapped->buttons[kButtonQuaternary] = input.buttons[3]; |
| + mapped->buttons[kButtonLeftShoulder] = 4; |
|
scottmg
2013/03/18 17:29:43
I'm assuming these two lines are incorrect.
|
| + mapped->buttons[kButtonRightShoulder] = 5; |
| + |
| + mapped->buttons[kButtonLeftTrigger] = 0; |
| + mapped->buttons[kButtonRightTrigger] = 0; |
| + mapped->buttons[kButtonBackSelect] = 0; |
| + mapped->buttons[kButtonStart] = 0; |
| + mapped->buttons[kButtonLeftThumbstick] = 0; |
| + mapped->buttons[kButtonRightThumbstick] = 0; |
| + |
| + mapped->buttons[kButtonDpadUp] = 0; |
| + mapped->buttons[kButtonDpadDown] = 0; |
| + mapped->buttons[kButtonDpadLeft] = 0; |
| + mapped->buttons[kButtonDpadRight] = 0; |
| + mapped->buttons[kButtonMeta] = 0; |
| + |
| + mapped->axes[0] = NormalizeDirectInputAxis(input.axes[0]); |
| + mapped->axes[1] = NormalizeDirectInputAxis(input.axes[1]); |
| + mapped->axes[2] = NormalizeDirectInputAxis(input.axes[5]); |
| + mapped->axes[3] = NormalizeDirectInputAxis(input.axes[2]); |
| + |
| + mapped->buttonsLength = 16; |
| + mapped->axesLength = 4; |
| +} |
| + |
| void Mapper2Axes8Keys( |
| const WebKit::WebGamepad& input, |
| WebKit::WebGamepad* mapped) { |
| @@ -105,6 +138,7 @@ |
| { "0079", "0006", MapperDragonRiseGeneric }, // DragonRise Generic USB |
| { "046d", "c216", MapperLogitechDualAction }, // Logitech DualAction |
| { "046d", "c21a", MapperLogitechPrecision }, // Logitech Precision |
| + { "046d", "c215", MapperLogitechExtreme3DPro }, // Logitech Extreme 3D Pro |
| { "12bd", "d012", Mapper2Axes8Keys }, // 2Axes 8Keys Game Pad |
| }; |