Skip to content

Commit be55168

Browse files
committed
Add explicit enum values to remaining buttons
Again, not really necessary because these should be implicit given the previous values and the type. But making them explicit to indicate intent. Using numbers indexed from 0 here to allow the user to do a for loop to set all of the buttons from say a packed 16-bit value.
1 parent a8a089e commit be55168

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/XInput.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
enum XInputControl : uint8_t {
3333
BUTTON_LOGO = 0,
34-
BUTTON_A = 1,
34+
BUTTON_A = 1,
3535
BUTTON_B = 2,
3636
BUTTON_X = 3,
3737
BUTTON_Y = 4,
@@ -41,12 +41,12 @@ enum XInputControl : uint8_t {
4141
BUTTON_START = 8,
4242
BUTTON_L3 = 9,
4343
BUTTON_R3 = 10,
44-
DPAD_UP,
45-
DPAD_DOWN,
46-
DPAD_LEFT,
47-
DPAD_RIGHT,
48-
TRIGGER_LEFT,
49-
TRIGGER_RIGHT,
44+
DPAD_UP = 11,
45+
DPAD_DOWN = 12,
46+
DPAD_LEFT = 13,
47+
DPAD_RIGHT = 14,
48+
TRIGGER_LEFT = 15,
49+
TRIGGER_RIGHT = 16,
5050
JOY_LEFT,
5151
JOY_RIGHT,
5252
};

0 commit comments

Comments
 (0)