From ae378dc7f5c5f7528fc080c5595bf0367f1f4b37 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 25 Feb 2017 22:49:06 +0900 Subject: [PATCH] input: Extend number of gamepad buttons from 16 to 32 (for PS4) --- gamepad.go | 18 +++++++++++++++++- internal/ui/gamepadbutton.go | 16 ++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/gamepad.go b/gamepad.go index 757ea8db9..f712eb527 100644 --- a/gamepad.go +++ b/gamepad.go @@ -39,5 +39,21 @@ const ( GamepadButton13 = GamepadButton(ui.GamepadButton13) GamepadButton14 = GamepadButton(ui.GamepadButton14) GamepadButton15 = GamepadButton(ui.GamepadButton15) - GamepadButtonMax = GamepadButton15 + GamepadButton16 = GamepadButton(ui.GamepadButton16) + GamepadButton17 = GamepadButton(ui.GamepadButton17) + GamepadButton18 = GamepadButton(ui.GamepadButton18) + GamepadButton19 = GamepadButton(ui.GamepadButton19) + GamepadButton20 = GamepadButton(ui.GamepadButton20) + GamepadButton21 = GamepadButton(ui.GamepadButton21) + GamepadButton22 = GamepadButton(ui.GamepadButton22) + GamepadButton23 = GamepadButton(ui.GamepadButton23) + GamepadButton24 = GamepadButton(ui.GamepadButton24) + GamepadButton25 = GamepadButton(ui.GamepadButton25) + GamepadButton26 = GamepadButton(ui.GamepadButton26) + GamepadButton27 = GamepadButton(ui.GamepadButton27) + GamepadButton28 = GamepadButton(ui.GamepadButton28) + GamepadButton29 = GamepadButton(ui.GamepadButton29) + GamepadButton30 = GamepadButton(ui.GamepadButton30) + GamepadButton31 = GamepadButton(ui.GamepadButton31) + GamepadButtonMax = GamepadButton31 ) diff --git a/internal/ui/gamepadbutton.go b/internal/ui/gamepadbutton.go index b9fac679f..c0f0780ed 100644 --- a/internal/ui/gamepadbutton.go +++ b/internal/ui/gamepadbutton.go @@ -33,4 +33,20 @@ const ( GamepadButton13 GamepadButton14 GamepadButton15 + GamepadButton16 + GamepadButton17 + GamepadButton18 + GamepadButton19 + GamepadButton20 + GamepadButton21 + GamepadButton22 + GamepadButton23 + GamepadButton24 + GamepadButton25 + GamepadButton26 + GamepadButton27 + GamepadButton28 + GamepadButton29 + GamepadButton30 + GamepadButton31 )