libretro.api.rumble¶
Rumble (force feedback) interface types.
Corresponds to retro_rumble_interface in libretro.h.
See also
RumbleDriverThe
Protocolthat uses these types to implement rumble support in libretro.py.libretro.drivers.rumblelibretro.py’s included
RumbleDriverimplementations.
Module Attributes
Corresponds to |
|
Set the rumble intensity for one motor of a controller. |
Classes
Enumeration of rumble motor types. |
|
Interface for a |
- retro_set_rumble_state_t¶
Set the rumble intensity for one motor of a controller.
Registered by the frontend and called by the core. Each controller has independent strong and weak motors; setting one does not override the other.
- Parameters:
port – Index of the controller port to address.
effect – A
RumbleEffectselecting the strong or weak motor.strength – Desired motor intensity, in the range
[0, 0xFFFF].
- Returns:
Trueif the rumble state was honored,Falseif the controller does not support rumble.
Corresponds to
retro_set_rumble_state_tinlibretro.h.See also
RumbleDriver.set_rumble_stateThe suggested entry point for implementing rumble support in a core.
- class RumbleEffect[source]¶
Bases:
IntEnumEnumeration of rumble motor types.
>>> from libretro.api import RumbleEffect >>> RumbleEffect.STRONG <RumbleEffect.STRONG: 0>
- STRONG = 0¶
- WEAK = 1¶
- __new__(value)¶
- classmethod value in self¶
Return True if value is in cls.
value is in cls if: 1) value is a member of cls, or 2) value is the value of one of the cls’s members. 3) value is a pseudo-member (flags)
- classmethod self[name]¶
Return the member matching name.
- __init__()¶
- classmethod iter(self)¶
Return members in definition order.
- classmethod len(self)¶
Return the number of members (no aliases)
- class retro_rumble_interface[source]¶
Bases:
StructureInterface for a
Coreto provide rumble (force feedback) support.Corresponds to
retro_rumble_interfaceinlibretro.h.- set_rumble_state¶
Sets the rumble intensity for the controller assigned to a given input port.
- __init__(*args, **kwargs)¶
- classmethod __new__(*args, **kwargs)¶
- __deepcopy__(_)[source]¶
Return copy of this object. Intended for use with
copy.deepcopy().
- retro_rumble_effect¶
Corresponds to
retro_rumble_effectinlibretro.h.