SDL_Libretro 0.1.0
SDL3-power libretro frontend.
Loading...
Searching...
No Matches
Functions
SDL_libretro_input.h File Reference

SDL_libretro - input subsystem. More...

Go to the source code of this file.

Functions

SDL_LibretroAnalogToDigital SDL_Libretro_GetAnalogToDigital (const SDL_Libretro *lr, unsigned port)
 Get the analog stick that also registers D-Pad presses on a controller port.
 
bool SDL_Libretro_GetInputDescriptor (const SDL_Libretro *lr, unsigned index, unsigned *port, unsigned *device, unsigned *id, const char **description)
 Retrieve an input descriptor by index.
 
unsigned SDL_Libretro_GetInputDescriptorCount (const SDL_Libretro *lr)
 Retrieve the number of input descriptors provided by a Libretro core.
 
unsigned SDL_Libretro_GetMousePort (const SDL_Libretro *lr)
 Get the controller port that the mouse drives.
 
unsigned SDL_Libretro_GetPortDevice (const SDL_Libretro *lr, unsigned port)
 Get the device type assigned to a controller port.
 
void SDL_Libretro_HandleEvent (SDL_Libretro *lr, const SDL_Event *event)
 Call this function within the SDL_PollEvent() loop to ensure libretro knows of important events.
 
void SDL_Libretro_SetAnalogToDigital (SDL_Libretro *lr, unsigned port, SDL_LibretroAnalogToDigital stick)
 Selects which analog stick, if any, also registers D-Pad presses on the given controller port, alongside the physical D-Pad.
 
void SDL_Libretro_SetGamepadMapping (SDL_Libretro *lr, unsigned port, int retroButton, SDL_GamepadButton button)
 Maps an SDL gamepad button to a RETRO_DEVICE_ID_JOYPAD_* button on the given controller port.
 
void SDL_Libretro_SetKeyboardMapping (SDL_Libretro *lr, int retroButton, SDL_Scancode scancode)
 Maps a keyboard key to a RETRO_DEVICE_ID_JOYPAD_* button for Player 1 (controller port 0).
 
void SDL_Libretro_SetMousePort (SDL_Libretro *lr, unsigned port)
 Selects the one controller port that the mouse drives.
 
bool SDL_Libretro_SetPortDevice (SDL_Libretro *lr, unsigned port, unsigned device)
 Assign a device type to a controller port.
 
void SDL_Libretro_SetVirtualButton (SDL_Libretro *lr, unsigned port, int button, bool pressed)
 Press or release a joypad button from code, such as from an on-screen touch control.
 

Detailed Description

SDL_libretro - input subsystem.

Definition in file SDL_libretro_input.h.