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 // ActionLast is used for iterating ActionLast uint32 = libretro.DeviceIDJoypadR3 + 4 )
View Source
const MaxPlayers = 5
MaxPlayers is the maximum number of players to poll input for
Variables ¶
View Source
var ( NewState inputstate // input state for the current frame OldState inputstate // input state for the previous frame Released inputstate // keys just released during this frame Pressed inputstate // keys just pressed during this frame )
Input state for all the players
Functions ¶
func ProcessActions ¶
func ProcessActions()
ProcessActions checks if certain keys are pressed and perform corresponding actions
Types ¶
type ContextReseter ¶
type ContextReseter interface {
ContextReset()
}
ContextReseter is an interface to to allow reloading icons after the window is recreated when switching fullscreen
Click to show internal directories.
Click to hide internal directories.