libretro.drivers.disk.driver¶
Protocol definition for the emulated disk-control interface.
See also
libretro.api.diskThe matching
ctypestypes and callback definitions.
Classes
Protocol for drivers that expose the emulated system's disk-control interface. |
- class DiskDriver[source]¶
Bases:
ProtocolProtocol for drivers that expose the emulated system’s disk-control interface.
See also
libretro.api.diskThe matching
ctypestypes and callback definitions.
- abstract property version¶
The version of the disk-control interface registered by the core.
Returns
1if the core registered aretro_disk_control_callbackviaRETRO_ENVIRONMENT_SET_DISK_CONTROL_INTERFACE,2if it registered aretro_disk_control_ext_callbackviaRETRO_ENVIRONMENT_SET_DISK_CONTROL_EXT_INTERFACE, and0if no callback has been registered.
- abstract property callback¶
The disk-control callback registered by the core, if any.
The concrete type reflects which env-call the core used to register it.
Noneif the core has not registered a disk-control interface.- Parameters:
value – The callback to register. Use
retro_disk_control_callbackfor v1 andretro_disk_control_ext_callbackfor v2.- Raises:
UnsupportedEnvCall – If this driver does not accept disk-control callbacks of the given type.
See also
retro_disk_control_callbackThe v1 callback struct registered via
RETRO_ENVIRONMENT_SET_DISK_CONTROL_INTERFACE.retro_disk_control_ext_callbackThe v2 callback struct registered via
RETRO_ENVIRONMENT_SET_DISK_CONTROL_EXT_INTERFACE.
- __init__(*args, **kwargs)¶
- classmethod __new__(*args, **kwargs)¶
- abstract property eject_state¶
Whether the emulated disk tray is currently open.
Reads and writes pass through to
retro_disk_control_callback.get_eject_stateandretro_disk_control_callback.set_eject_staterespectively.- Parameters:
- Raises:
UnsupportedEnvCall – If no disk-control callback has been registered.