Documentation ¶
Overview ¶
Package input exposes the two input callbacks Poll and State needed by the libretro implementation. It uses GLFW to access keyboard and joypad, and takes care of binding and auto configuring joypads.
Index ¶
Constants ¶
View Source
const ( // ActionMenuToggle toggles the menu UI ActionMenuToggle uint32 = libretro.DeviceIDJoypadR3 + 1 // ActionFullscreenToggle switches between fullscreen and windowed mode ActionFullscreenToggle uint32 = libretro.DeviceIDJoypadR3 + 2 // ActionShouldClose will cause the program to shutdown ActionShouldClose uint32 = libretro.DeviceIDJoypadR3 + 3 // ActionFastForwardToggle will run the core as fast as possible ActionFastForwardToggle uint32 = libretro.DeviceIDJoypadR3 + 4 // ActionLast is used for iterating ActionLast uint32 = libretro.DeviceIDJoypadR3 + 5 )
Hot keys
View Source
const MaxPlayers = 5
MaxPlayers is the maximum number of players to poll input for
Variables ¶
This section is empty.
Functions ¶
func HasBinding ¶ added in v0.10.3
HasBinding returns true if the joystick has an autoconfig binding
Types ¶
type States ¶ added in v0.12.3
type States [MaxPlayers][ActionLast]bool
States is the state of inputs for all players
Click to show internal directories.
Click to hide internal directories.