Skip to content

Commit 1794f6e

Browse files
authored
Merge branch 'develop' into use-penstate-displayIndex
2 parents 72a80cc + a318c46 commit 1794f6e

File tree

1 file changed

+137
-1
lines changed

1 file changed

+137
-1
lines changed

Packages/com.unity.inputsystem/InputSystem/Plugins/XInput/XInputController.cs

Lines changed: 137 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,20 +148,156 @@ internal enum DeviceType
148148
/// Controller subtype enumeration in <c>SubType</c> field of <c>XINPUT_CAPABILITIES</c>.
149149
/// </summary>
150150
/// <remarks>
151-
/// See <a href="https://docs.microsoft.com/en-us/windows/win32/xinput/xinput-and-controller-subtypes">MSDN</a>.
151+
/// Provides additional detail about the underlying hardware being used and how it maps physical to logical
152+
/// controls.
153+
///
154+
/// See <a href="https://docs.microsoft.com/en-us/windows/win32/xinput/xinput-and-controller-subtypes">MSDN</a>
155+
/// for additional details.
152156
/// </remarks>
153157
public enum DeviceSubType
154158
{
159+
/// <summary>
160+
/// The controller type is unknown.
161+
/// </summary>
155162
Unknown = 0x00,
163+
164+
/// <summary>
165+
/// Gamepad controller.
166+
/// </summary>
167+
/// <remarks>
168+
/// Includes left and right stick as <see cref="Gamepad.leftStick" /> and <see cref="Gamepad.rightStick"/>,
169+
/// left and right trigger as <see cref="Gamepad.leftTrigger"/> and <see cref="Gamepad.rightTrigger"/>,
170+
/// directional pad as <see cref="Gamepad.dpad"/>,
171+
/// and all standard buttons (<see cref="Gamepad.buttonSouth"/>, <see cref="Gamepad.buttonEast"/>,
172+
/// <see cref="Gamepad.buttonWest"/>, <see cref="Gamepad.buttonNorth"/>,
173+
/// <see cref="Gamepad.startButton"/>, <see cref="Gamepad.selectButton"/>,
174+
/// <see cref="Gamepad.leftShoulder"/>, <see cref="Gamepad.rightShoulder"/>,
175+
/// <see cref="Gamepad.leftStickButton"/>, <see cref="Gamepad.rightStickButton"/>).
176+
/// </remarks>
156177
Gamepad = 0x01,
178+
179+
/// <summary>
180+
/// Racing wheel controller.
181+
/// </summary>
182+
/// <remarks>
183+
/// <see cref="UnityEngine.InputSystem.Gamepad.leftStick" /> x-axis reports the wheel rotation,
184+
/// <see cref="Gamepad.rightTrigger"/> is the acceleration pedal, and
185+
/// <see cref="Gamepad.leftTrigger"/>Left Trigger is the brake pedal.
186+
/// Includes Directional Pad as <see cref="Gamepad.dpad"/> and most standard buttons
187+
/// (<see cref="Gamepad.buttonSouth"/>, <see cref="Gamepad.buttonEast"/>,
188+
/// <see cref="Gamepad.buttonWest"/>, <see cref="Gamepad.buttonNorth"/>,
189+
/// <see cref="Gamepad.startButton"/>, <see cref="Gamepad.selectButton"/>,
190+
/// <see cref="Gamepad.leftShoulder"/>, <see cref="Gamepad.rightShoulder"/>).
191+
/// <see cref="Gamepad.leftStickButton"/> and <see cref="Gamepad.rightStickButton"/> are optional.
192+
/// </remarks>
157193
Wheel = 0x02,
194+
195+
/// <summary>
196+
/// Arcade stick controller.
197+
/// </summary>
198+
/// <remarks>
199+
/// Includes a Digital Stick that reports as a <see cref="Gamepad.dpad"/> (up, down, left, right),
200+
/// and most standard buttons (<see cref="Gamepad.buttonSouth"/>, <see cref="Gamepad.buttonEast"/>,
201+
/// <see cref="Gamepad.buttonWest"/>, <see cref="Gamepad.buttonNorth"/>,
202+
/// <see cref="Gamepad.startButton"/>, <see cref="Gamepad.selectButton"/>).
203+
/// The <see cref="Gamepad.leftTrigger"/> and <see cref="Gamepad.rightTrigger"/> are implemented as digital
204+
/// buttons and report either 0.0f or 1.0f.
205+
/// The <see cref="Gamepad.leftShoulder"/>, <see cref="Gamepad.rightShoulder"/> and
206+
/// <see cref="Gamepad.leftStickButton"/>, <see cref="Gamepad.rightStickButton"/> are optional.
207+
/// </remarks>
158208
ArcadeStick = 0x03,
209+
210+
/// <summary>
211+
/// Flight stick controller.
212+
/// </summary>
213+
/// <remarks>
214+
/// Includes a pitch and roll stick that reports as the <see cref="Gamepad.leftStick"/>, a POV Hat which
215+
/// reports as the <see cref="Gamepad.rightStick"/>, a rudder (handle twist or rocker) that reports as
216+
/// <see cref="Gamepad.leftTrigger"/>, and a throttle control as the <see cref="Gamepad.rightTrigger"/>.
217+
/// Includes support for a primary weapon (<see cref="Gamepad.buttonSouth"/>), secondary weapon
218+
/// (<see cref="Gamepad.buttonEast"/>), and other standard buttons (<see cref="Gamepad.buttonWest"/>,
219+
/// <see cref="Gamepad.buttonNorth"/>, <see cref="Gamepad.startButton"/>,
220+
/// <see cref="Gamepad.selectButton"/>).
221+
/// <see cref="Gamepad.leftShoulder"/>, <see cref="Gamepad.rightShoulder"/> and
222+
/// <see cref="Gamepad.leftStickButton"/>, <see cref="Gamepad.rightStickButton"/> are optional.
223+
/// </remarks>
159224
FlightStick = 0x04,
225+
226+
/// <summary>
227+
/// Dance pad controller.
228+
/// </summary>
229+
/// <remarks>
230+
/// Includes the <see cref="Gamepad.dpad"/> and standard buttons (<see cref="Gamepad.buttonSouth"/>,
231+
/// <see cref="Gamepad.buttonEast"/>, <see cref="Gamepad.buttonWest"/>,
232+
/// <see cref="Gamepad.buttonNorth"/>) on the pad, plus <see cref="Gamepad.startButton"/> and
233+
/// <see cref="Gamepad.selectButton"/>.
234+
/// </remarks>
160235
DancePad = 0x05,
236+
237+
/// <summary>
238+
/// Guitar controller.
239+
/// </summary>
240+
/// <remarks>
241+
/// The strum bar maps to <see cref="Gamepad.dpad"/> (up and down), and the frets are assigned to
242+
/// <see cref="Gamepad.buttonSouth"/> (green), <see cref="Gamepad.buttonEast"/> (red),
243+
/// <see cref="Gamepad.buttonNorth"/> (yellow), <see cref="Gamepad.buttonWest"/> (blue), and
244+
/// <see cref="Gamepad.leftShoulder"/> (orange).
245+
/// <see cref="Gamepad.rightStick"/> y-axis is associated with a vertical orientation sensor;
246+
/// <see cref="Gamepad.rightStick"/> x-axis is the whammy bar.
247+
/// Includes support for <see cref="Gamepad.selectButton"/>, <see cref="Gamepad.startButton"/>,
248+
/// <see cref="Gamepad.dpad"/> (left, right).
249+
/// <see cref="Gamepad.leftTrigger"/> (pickup selector), <see cref="Gamepad.rightTrigger"/>,
250+
/// <see cref="Gamepad.rightShoulder"/>, <see cref="Gamepad.leftStickButton"/> (fret modifier),
251+
/// <see cref="Gamepad.rightStickButton"/> are optional.
252+
/// </remarks>
161253
Guitar = 0x06,
254+
255+
/// <summary>
256+
/// Alternate guitar controller.
257+
/// </summary>
258+
/// <remarks>
259+
/// Similar to <see cref="Guitar"/> but supports a larger range of movement for the vertical orientation
260+
/// sensor.
261+
/// </remarks>
162262
GuitarAlternate = 0x07,
263+
264+
/// <summary>
265+
/// Drum kit controller.
266+
/// </summary>
267+
/// <remarks>
268+
/// The drum pads are assigned to buttons: <see cref="Gamepad.buttonSouth"/> for green (Floor Tom),
269+
/// <see cref="Gamepad.buttonEast"/> for red (Snare Drum),
270+
/// <see cref="Gamepad.buttonWest"/> for blue (Low Tom),
271+
/// <see cref="Gamepad.buttonNorth"/> for yellow (High Tom),
272+
/// and <see cref="Gamepad.leftShoulder"/> for the pedal (Bass Drum).
273+
/// Includes <see cref="Gamepad.dpad"/>, <see cref="Gamepad.selectButton"/>, and
274+
/// <see cref="Gamepad.startButton"/>. <see cref="Gamepad.rightShoulder"/>,
275+
/// <see cref="Gamepad.leftStickButton"/>, and <see cref="Gamepad.rightStickButton"/> are optional.
276+
/// </remarks>
163277
DrumKit = 0x08,
278+
279+
/// <summary>
280+
/// Bass guitar controller.
281+
/// </summary>
282+
/// <remarks>
283+
/// Identical to <see cref="Guitar" />, with the distinct subtype to simplify setup.
284+
/// </remarks>
164285
GuitarBass = 0x0B,
286+
287+
/// <summary>
288+
/// Arcade pad controller.
289+
/// </summary>
290+
/// <remarks>
291+
/// Includes Directional Pad and most standard buttons
292+
/// (<see cref="Gamepad.buttonSouth"/>, <see cref="Gamepad.buttonEast"/>,
293+
/// <see cref="Gamepad.buttonWest"/>, <see cref="Gamepad.buttonNorth"/>,
294+
/// <see cref="Gamepad.startButton"/>, <see cref="Gamepad.selectButton"/>,
295+
/// <see cref="Gamepad.leftShoulder"/>, <see cref="Gamepad.rightShoulder"/>).
296+
/// The <see cref="Gamepad.leftTrigger"/>, <see cref="Gamepad.rightTrigger"/> are implemented as digital
297+
/// buttons and report either 0.0f or 1.0f.
298+
/// <see cref="Gamepad.leftStick"/>, <see cref="Gamepad.rightStick"/>,
299+
/// <see cref="Gamepad.leftStickButton"/> and <see cref="Gamepad.rightStickButton"/> are optional.
300+
/// </remarks>
165301
ArcadePad = 0x13
166302
}
167303

0 commit comments

Comments
 (0)