Lines Matching refs:input

13 float AxisToButton(float input) {
14 return (input + 1.f) / 2.f;
17 float AxisNegativeAsButton(float input) {
18 return (input < -0.5f) ? 1.f : 0.f;
21 float AxisPositiveAsButton(float input) {
22 return (input > 0.5f) ? 1.f : 0.f;
26 const WebKit::WebGamepad& input,
28 *mapped = input;
29 mapped->buttons[kButtonLeftTrigger] = AxisToButton(input.axes[2]);
30 mapped->buttons[kButtonRightTrigger] = AxisToButton(input.axes[5]);
31 mapped->buttons[kButtonBackSelect] = input.buttons[6];
32 mapped->buttons[kButtonStart] = input.buttons[7];
33 mapped->buttons[kButtonLeftThumbstick] = input.buttons[9];
34 mapped->buttons[kButtonRightThumbstick] = input.buttons[10];
35 mapped->buttons[kButtonDpadUp] = AxisNegativeAsButton(input.axes[7]);
36 mapped->buttons[kButtonDpadDown] = AxisPositiveAsButton(input.axes[7]);
37 mapped->buttons[kButtonDpadLeft] = AxisNegativeAsButton(input.axes[6]);
38 mapped->buttons[kButtonDpadRight] = AxisPositiveAsButton(input.axes[6]);
39 mapped->buttons[kButtonMeta] = input.buttons[8];
40 mapped->axes[kAxisRightStickX] = input.axes[3];
41 mapped->axes[kAxisRightStickY] = input.axes[4];
47 const WebKit::WebGamepad& input,
49 *mapped = input;
50 mapped->buttons[kButtonPrimary] = input.buttons[2];
51 mapped->buttons[kButtonTertiary] = input.buttons[3];
52 mapped->buttons[kButtonQuaternary] = input.buttons[0];
53 mapped->buttons[kButtonLeftShoulder] = input.buttons[6];
54 mapped->buttons[kButtonRightShoulder] = input.buttons[7];
55 mapped->buttons[kButtonLeftTrigger] = input.buttons[4];
56 mapped->buttons[kButtonRightTrigger] = input.buttons[5];
57 mapped->buttons[kButtonBackSelect] = input.buttons[9];
58 mapped->buttons[kButtonStart] = input.buttons[8];
59 mapped->buttons[kButtonDpadUp] = AxisNegativeAsButton(input.axes[5]);
60 mapped->buttons[kButtonDpadDown] = AxisPositiveAsButton(input.axes[5]);
61 mapped->buttons[kButtonDpadLeft] = AxisNegativeAsButton(input.axes[4]);
62 mapped->buttons[kButtonDpadRight] = AxisPositiveAsButton(input.axes[4]);
68 const WebKit::WebGamepad& input,
70 *mapped = input;
71 mapped->buttons[kButtonPrimary] = input.buttons[14];
72 mapped->buttons[kButtonSecondary] = input.buttons[13];
73 mapped->buttons[kButtonTertiary] = input.buttons[15];
74 mapped->buttons[kButtonQuaternary] = input.buttons[12];
75 mapped->buttons[kButtonLeftShoulder] = input.buttons[10];
76 mapped->buttons[kButtonRightShoulder] = input.buttons[11];
77 mapped->buttons[kButtonLeftTrigger] = AxisToButton(input.axes[12]);
78 mapped->buttons[kButtonRightTrigger] = AxisToButton(input.axes[13]);
79 mapped->buttons[kButtonBackSelect] = input.buttons[0];
80 mapped->buttons[kButtonStart] = input.buttons[3];
81 mapped->buttons[kButtonLeftThumbstick] = input.buttons[1];
82 mapped->buttons[kButtonRightThumbstick] = input.buttons[2];
83 mapped->buttons[kButtonDpadUp] = AxisToButton(input.axes[8]);
84 mapped->buttons[kButtonDpadDown] = AxisToButton(input.axes[10]);
85 mapped->buttons[kButtonDpadLeft] = input.buttons[7];
86 mapped->buttons[kButtonDpadRight] = AxisToButton(input.axes[9]);
87 mapped->buttons[kButtonMeta] = input.buttons[16];
94 const WebKit::WebGamepad& input,
96 *mapped = input;
97 mapped->buttons[kButtonPrimary] = input.buttons[2];
98 mapped->buttons[kButtonSecondary] = input.buttons[1];
99 mapped->buttons[kButtonTertiary] = input.buttons[3];
100 mapped->buttons[kButtonQuaternary] = input.buttons[0];
101 mapped->buttons[kButtonLeftShoulder] = input.buttons[6];
102 mapped->buttons[kButtonRightShoulder] = input.buttons[7];
103 mapped->buttons[kButtonLeftTrigger] = input.buttons[4];
104 mapped->buttons[kButtonRightTrigger] = input.buttons[5];
105 mapped->buttons[kButtonDpadUp] = AxisNegativeAsButton(input.axes[5]);
106 mapped->buttons[kButtonDpadDown] = AxisPositiveAsButton(input.axes[5]);
107 mapped->buttons[kButtonDpadLeft] = AxisNegativeAsButton(input.axes[4]);
108 mapped->buttons[kButtonDpadRight] = AxisPositiveAsButton(input.axes[4]);
109 mapped->axes[kAxisRightStickX] = input.axes[3];
110 mapped->axes[kAxisRightStickY] = input.axes[2];
117 const WebKit::WebGamepad& input,
119 *mapped = input;
120 mapped->buttons[kButtonDpadUp] = AxisNegativeAsButton(input.axes[6]);
121 mapped->buttons[kButtonDpadDown] = AxisPositiveAsButton(input.axes[6]);
122 mapped->buttons[kButtonDpadLeft] = AxisNegativeAsButton(input.axes[5]);
123 mapped->buttons[kButtonDpadRight] = AxisPositiveAsButton(input.axes[5]);
124 mapped->axes[kAxisLeftStickX] = input.axes[0];
125 mapped->axes[kAxisLeftStickY] = input.axes[1];
126 mapped->axes[kAxisRightStickX] = input.axes[3];
127 mapped->axes[kAxisRightStickY] = input.axes[4];