| Top |
The RetroInput structure represents an input from a controller, like a button, an axis, or a key.
To know the represented input type, first check the input's controller type
via retro_input_get_controller_type(), then use the accessor function
matching it.
E.g. if the controller type is RETRO_CONTROLLER_TYPE_JOYPAD, you can know
which joypad input type is represented via retro_input_get_joypad().
RetroInput *
retro_input_copy (RetroInput *self);
Copies self
into a new RetroInput.
RetroControllerType
retro_input_get_controller_type (RetroInput *self);
Gets the controller type of self
.
gboolean retro_input_get_joypad (RetroInput *self,RetroJoypadId *id);
Gets the joypad id of self
, if any.
gboolean retro_input_get_mouse (RetroInput *self,RetroMouseId *id);
Gets the mouse id of self
, if any.
gboolean retro_input_get_lightgun (RetroInput *self,RetroLightgunId *id);
Gets the lightgun id of self
, if any.
gboolean retro_input_get_analog (RetroInput *self,RetroAnalogId *id,RetroAnalogIndex *index);
Gets the analog id and index of self
, if any.
gboolean retro_input_get_pointer (RetroInput *self,RetroPointerId *id);
Gets the pointer id of self
, if any.