diff --git a/input/binds_keyboard.go b/input/binds_keyboard.go index 6223f327..d6702bd7 100644 --- a/input/binds_keyboard.go +++ b/input/binds_keyboard.go @@ -18,7 +18,6 @@ var keyBinds = map[glfw.Key]uint32{ glfw.KeyRight: libretro.DeviceIDJoypadRight, glfw.KeyEnter: libretro.DeviceIDJoypadStart, glfw.KeyRightShift: libretro.DeviceIDJoypadSelect, - glfw.KeyTab: ActionSwitchPads, glfw.KeySpace: ActionFastForwardToggle, glfw.KeyP: ActionMenuToggle, glfw.KeyF: ActionFullscreenToggle, diff --git a/input/input.go b/input/input.go index 8a1d3f80..22ce36cf 100644 --- a/input/input.go +++ b/input/input.go @@ -45,10 +45,8 @@ const ( ActionShouldClose uint32 = lr.DeviceIDJoypadR3 + 3 // ActionFastForwardToggle will run the core as fast as possible ActionFastForwardToggle uint32 = lr.DeviceIDJoypadR3 + 4 - // ActionSwitchPads - ActionSwitchPads uint32 = lr.DeviceIDJoypadR3 + 5 // ActionLast is used for iterating - ActionLast uint32 = lr.DeviceIDJoypadR3 + 6 + ActionLast uint32 = lr.DeviceIDJoypadR3 + 5 ) // joystickCallback is triggered when a joypad is plugged. @@ -74,8 +72,6 @@ func Init(v *video.Video) { vid = v if !glfw.UpdateGamepadMappings(mappings) { log.Println("Failed to update mappings") - } else { - log.Println("Updated mappings") } glfw.SetJoystickCallback(joystickCallback) } @@ -136,13 +132,11 @@ func pollJoypads(state States, analogState AnalogStates) (States, AnalogStates) return state, analogState } -var KbdPort int = 0 - // pollKeyboard processes keyboard keys func pollKeyboard(state States) States { for k, v := range keyBinds { if vid.Window.GetKey(k) == glfw.Press { - state[KbdPort][v] = 1 + state[0][v] = 1 } } return state diff --git a/menu/input.go b/menu/input.go index 2a496c1e..daacbe88 100644 --- a/menu/input.go +++ b/menu/input.go @@ -213,11 +213,6 @@ func (m *Menu) ProcessHotkeys() { } } - if input.Released[input.KbdPort][input.ActionSwitchPads] == 1 { - input.KbdPort = (input.KbdPort + 1) % 2 - ntf.DisplayAndLog(ntf.Info, "Menu", "Switched pads") - } - // Close if ActionShouldClose is pressed, but display a confirmation dialog // in case a game is running if input.Pressed[0][input.ActionShouldClose] == 1 {