libretro.drivers.timing.default¶
Default TimingDriver used when none is supplied to a session.
See also
TimingDriverThe protocol this driver implements.
Classes
The default |
- class DefaultTimingDriver[source]¶
Bases:
TimingDriverThe default
TimingDriverused when aSessionis given no other.Stores the throttle state and target refresh rate verbatim and reports them to the core unchanged.
See also
TimingDriverThe protocol this class implements.
- __init__(throttle_state=None, target_refresh_rate=60.0)[source]¶
Initialize the driver with optional throttle state and target refresh rate.
- Parameters:
- Raises:
TypeError – If
throttle_stateis neither aretro_throttle_statenorNone, or iftarget_refresh_rateis neither afloatnorNone.
- property frame_time_callback¶
The frame-time callback registered by the core, if any.
Set via
RETRO_ENVIRONMENT_SET_FRAME_TIME_CALLBACK.Noneif the core has not registered one.- Parameters:
value – The frame-time callback to register.
- Raises:
UnsupportedEnvCall – If this driver does not support the frame-time callback.
See also
retro_frame_time_callbackThe C struct registered by the core that contains this callback.
- property fastforwarding_override¶
The fast-forward override requested by the core, if any.
Set via
RETRO_ENVIRONMENT_SET_FASTFORWARDING_OVERRIDE.- Parameters:
value – The fast-forward override to register.
- Raises:
UnsupportedEnvCall – If this driver does not support fast-forward overrides.
See also
retro_fastforwarding_overrideThe C struct describing the override.
- classmethod __new__(*args, **kwargs)¶
- frame_time(time)¶
Invoke the registered
frame_time_callback, if any.
- property throttle_state¶
The current throttle state reported to the core.
Returned to the core in response to
RETRO_ENVIRONMENT_GET_THROTTLE_STATE.- Parameters:
value – The throttle state to report.
- Raises:
UnsupportedEnvCall – If this driver does not report a throttle state.
See also
retro_throttle_stateThe C struct describing the throttle state.
- property target_refresh_rate¶
The frontend’s target refresh rate in Hz, if any.
Returned to the core in response to
RETRO_ENVIRONMENT_GET_TARGET_REFRESH_RATE.Noneif no target refresh rate is configured.- Parameters:
value – The target refresh rate in Hz.
- Raises:
UnsupportedEnvCall – If this driver does not report a target refresh rate.