libretro.api.led

Types for allowing Cores to control LED indicators on the host device.

See also

LedDriver

The protocol that uses these types to implement LED control support in libretro.py.

libretro.drivers.led

libretro.py’s included LedDriver implementations.

Module Attributes

retro_set_led_state_t

Set the state of an LED on the host device.

Classes

retro_led_interface

Defines a callback that Cores can use to control LED indicators on the host device.

class retro_led_interface[source]

Bases: Structure

Defines a callback that Cores can use to control LED indicators on the host device.

Corresponds to retro_led_interface in libretro.h.

set_led_state

Called by the Core to set the state of an LED.

__deepcopy__(_)[source]

Return a copy of this object. Intended for use with copy.deepcopy().

>>> import copy
>>> from libretro.api import retro_led_interface
>>> copy.deepcopy(retro_led_interface()).set_led_state is None
True
__init__(*args, **kwargs)
classmethod __new__(*args, **kwargs)
retro_set_led_state_t

Set the state of an LED on the host device.

Registered by the frontend and called by the core to enable or disable an indicator LED.

Parameters:
  • led – Index of the LED whose state will be changed.

  • state – New state of the LED; nonzero to enable, zero to disable.

Corresponds to retro_set_led_state_t in libretro.h.

See also

LedDriver.set_led_state

The suggested entry point for this callback.