Crate rust_libretro_sys

Source

Macros§

RETRO_DEVICE_SUBCLASS
#define RETRO_DEVICE_SUBCLASS(base, id) (((id + 1) << RETRO_DEVICE_TYPE_SHIFT) | base)

Structs§

InvalidEnumValue
retro_audio_buffer_status_callback
retro_audio_callback
retro_camera_callback
retro_controller_description
retro_controller_info
retro_core_option_definition
retro_core_option_display
retro_core_option_v2_category
retro_core_option_v2_definition
retro_core_option_value
retro_core_options_intl
retro_core_options_update_display_callback
retro_core_options_v2
retro_core_options_v2_intl
retro_disk_control_callback
retro_disk_control_ext_callback
retro_fastforwarding_override
Used by a libretro core to override the current fastforwarding mode of the frontend
retro_frame_time_callback
retro_framebuffer
The memory in data is cached. If not cached, random writes and/or reading from the buffer is expected to be very slow.
retro_game_geometry
retro_game_info
retro_game_info_ext
Similar to retro_game_info, but provides extended information about the source content file and game memory buffer status. And array of retro_game_info_ext is returned by RETRO_ENVIRONMENT_GET_GAME_INFO_EXT NOTE: In the following descriptions, references to retro_load_game() may be replaced with retro_load_game_special()
retro_get_proc_address_interface
retro_hw_render_callback
retro_hw_render_context_negotiation_interface
Base struct. All retro_hw_render_context_negotiation_interface_* types contain at least these fields.
retro_hw_render_interface
Base struct. All retro_hw_render_interface_* types contain at least these fields.
retro_input_descriptor
Describes how the libretro implementation maps a libretro input bind to its internal input system through a human readable string. This string can be used to better let a user configure input.
retro_key
Keysyms used for ID in input state callback when polling RETRO_KEYBOARD.
retro_keyboard_callback
retro_led_interface
retro_location_callback
retro_log_callback
retro_memory_descriptor
retro_memory_map
The frontend may use the largest value of ‘start’+‘select’ in a certain namespace to infer the size of the address space.
retro_message
retro_message_ext
retro_midi_interface
retro_mod
retro_perf_callback
For convenience it can be useful to wrap register, start and stop in macros. E.g.: #ifdef LOG_PERFORMANCE #define RETRO_PERFORMANCE_INIT(perf_cb, name) static struct retro_perf_counter name = {#name}; if (!name.registered) perf_cb.perf_register(&(name)) #define RETRO_PERFORMANCE_START(perf_cb, name) perf_cb.perf_start(&(name)) #define RETRO_PERFORMANCE_STOP(perf_cb, name) perf_cb.perf_stop(&(name)) #else … Blank macros … #endif
retro_perf_counter
retro_rumble_interface
retro_sensor_interface
retro_subsystem_info
retro_subsystem_memory_info
retro_subsystem_rom_info
retro_system_av_info
retro_system_content_info_override
Defines overrides which modify frontend handling of specific content file types. An array of retro_system_content_info_override is passed to RETRO_ENVIRONMENT_SET_CONTENT_INFO_OVERRIDE NOTE: In the following descriptions, references to retro_load_game() may be replaced with retro_load_game_special()
retro_system_info
retro_system_timing
retro_throttle_state
retro_variable
retro_vfs_dir_handle
Opaque directory handle Introduced in VFS API v3
retro_vfs_file_handle
Opaque file handle Introduced in VFS API v1
retro_vfs_interface
retro_vfs_interface_info

Enums§

retro_camera_buffer
retro_hw_context_type
retro_hw_render_context_negotiation_interface_type
retro_hw_render_interface_type
retro_language
Id values for LANGUAGE
retro_log_level
retro_message_target
retro_message_type
retro_pixel_format
retro_rumble_effect
retro_savestate_context
retro_sensor_action
FIXME: Document the sensor API and work out behavior. It will be marked as experimental until then.

Constants§

RETRO_API_VERSION
RETRO_DEVICE_ANALOG
RETRO_DEVICE_ID_ANALOG_X
RETRO_DEVICE_ID_ANALOG_Y
RETRO_DEVICE_ID_JOYPAD_A
RETRO_DEVICE_ID_JOYPAD_B
RETRO_DEVICE_ID_JOYPAD_DOWN
RETRO_DEVICE_ID_JOYPAD_L
RETRO_DEVICE_ID_JOYPAD_L2
RETRO_DEVICE_ID_JOYPAD_L3
RETRO_DEVICE_ID_JOYPAD_LEFT
RETRO_DEVICE_ID_JOYPAD_MASK
RETRO_DEVICE_ID_JOYPAD_R
RETRO_DEVICE_ID_JOYPAD_R2
RETRO_DEVICE_ID_JOYPAD_R3
RETRO_DEVICE_ID_JOYPAD_RIGHT
RETRO_DEVICE_ID_JOYPAD_SELECT
RETRO_DEVICE_ID_JOYPAD_START
RETRO_DEVICE_ID_JOYPAD_UP
RETRO_DEVICE_ID_JOYPAD_X
RETRO_DEVICE_ID_JOYPAD_Y
RETRO_DEVICE_ID_LIGHTGUN_AUX_A
RETRO_DEVICE_ID_LIGHTGUN_AUX_B
RETRO_DEVICE_ID_LIGHTGUN_AUX_C
RETRO_DEVICE_ID_LIGHTGUN_CURSORDeprecated
RETRO_DEVICE_ID_LIGHTGUN_DPAD_DOWN
RETRO_DEVICE_ID_LIGHTGUN_DPAD_LEFT
RETRO_DEVICE_ID_LIGHTGUN_DPAD_RIGHT
RETRO_DEVICE_ID_LIGHTGUN_DPAD_UP
RETRO_DEVICE_ID_LIGHTGUN_IS_OFFSCREEN
RETRO_DEVICE_ID_LIGHTGUN_PAUSEDeprecated
RETRO_DEVICE_ID_LIGHTGUN_RELOAD
RETRO_DEVICE_ID_LIGHTGUN_SCREEN_X
RETRO_DEVICE_ID_LIGHTGUN_SCREEN_Y
RETRO_DEVICE_ID_LIGHTGUN_SELECT
RETRO_DEVICE_ID_LIGHTGUN_START
RETRO_DEVICE_ID_LIGHTGUN_TRIGGER
RETRO_DEVICE_ID_LIGHTGUN_TURBODeprecated
RETRO_DEVICE_ID_LIGHTGUN_XDeprecated
RETRO_DEVICE_ID_LIGHTGUN_YDeprecated
RETRO_DEVICE_ID_MOUSE_BUTTON_4
RETRO_DEVICE_ID_MOUSE_BUTTON_5
RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN
RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELUP
RETRO_DEVICE_ID_MOUSE_LEFT
RETRO_DEVICE_ID_MOUSE_MIDDLE
RETRO_DEVICE_ID_MOUSE_RIGHT
RETRO_DEVICE_ID_MOUSE_WHEELDOWN
RETRO_DEVICE_ID_MOUSE_WHEELUP
RETRO_DEVICE_ID_MOUSE_X
RETRO_DEVICE_ID_MOUSE_Y
RETRO_DEVICE_ID_POINTER_COUNT
RETRO_DEVICE_ID_POINTER_PRESSED
RETRO_DEVICE_ID_POINTER_X
RETRO_DEVICE_ID_POINTER_Y
RETRO_DEVICE_INDEX_ANALOG_BUTTON
RETRO_DEVICE_INDEX_ANALOG_LEFT
RETRO_DEVICE_INDEX_ANALOG_RIGHT
RETRO_DEVICE_JOYPAD
RETRO_DEVICE_KEYBOARD
RETRO_DEVICE_LIGHTGUN
RETRO_DEVICE_MASK
RETRO_DEVICE_MOUSE
RETRO_DEVICE_NONE
RETRO_DEVICE_POINTER
RETRO_DEVICE_TYPE_SHIFT
RETRO_ENVIRONMENT_EXPERIMENTAL
RETRO_ENVIRONMENT_GET_AUDIO_VIDEO_ENABLE
RETRO_ENVIRONMENT_GET_CAMERA_INTERFACE
RETRO_ENVIRONMENT_GET_CAN_DUPE
RETRO_ENVIRONMENT_GET_CONTENT_DIRECTORY
RETRO_ENVIRONMENT_GET_CORE_ASSETS_DIRECTORY
RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION
RETRO_ENVIRONMENT_GET_CURRENT_SOFTWARE_FRAMEBUFFER
RETRO_ENVIRONMENT_GET_DISK_CONTROL_INTERFACE_VERSION
RETRO_ENVIRONMENT_GET_FASTFORWARDING
RETRO_ENVIRONMENT_GET_GAME_INFO_EXT
RETRO_ENVIRONMENT_GET_HW_RENDER_INTERFACE
RETRO_ENVIRONMENT_GET_INPUT_BITMASKS
RETRO_ENVIRONMENT_GET_INPUT_DEVICE_CAPABILITIES
RETRO_ENVIRONMENT_GET_INPUT_MAX_USERS
RETRO_ENVIRONMENT_GET_LANGUAGE
RETRO_ENVIRONMENT_GET_LED_INTERFACE
RETRO_ENVIRONMENT_GET_LIBRETRO_PATH
RETRO_ENVIRONMENT_GET_LOCATION_INTERFACE
RETRO_ENVIRONMENT_GET_LOG_INTERFACE
RETRO_ENVIRONMENT_GET_MESSAGE_INTERFACE_VERSION
RETRO_ENVIRONMENT_GET_MIDI_INTERFACE
RETRO_ENVIRONMENT_GET_OVERSCAN
RETRO_ENVIRONMENT_GET_PERF_INTERFACE
RETRO_ENVIRONMENT_GET_PREFERRED_HW_RENDER
RETRO_ENVIRONMENT_GET_RUMBLE_INTERFACE
RETRO_ENVIRONMENT_GET_SAVESTATE_CONTEXT
RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY
RETRO_ENVIRONMENT_GET_SENSOR_INTERFACE
RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY
RETRO_ENVIRONMENT_GET_TARGET_REFRESH_RATE
RETRO_ENVIRONMENT_GET_THROTTLE_STATE
RETRO_ENVIRONMENT_GET_USERNAME
RETRO_ENVIRONMENT_GET_VARIABLE
RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE
RETRO_ENVIRONMENT_GET_VFS_INTERFACE
RETRO_ENVIRONMENT_PRIVATE
RETRO_ENVIRONMENT_SET_AUDIO_BUFFER_STATUS_CALLBACK
RETRO_ENVIRONMENT_SET_AUDIO_CALLBACK
RETRO_ENVIRONMENT_SET_CONTENT_INFO_OVERRIDE
RETRO_ENVIRONMENT_SET_CONTROLLER_INFO
RETRO_ENVIRONMENT_SET_CORE_OPTIONS
RETRO_ENVIRONMENT_SET_CORE_OPTIONS_DISPLAY
RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL
RETRO_ENVIRONMENT_SET_CORE_OPTIONS_UPDATE_DISPLAY_CALLBACK
RETRO_ENVIRONMENT_SET_CORE_OPTIONS_V2
RETRO_ENVIRONMENT_SET_CORE_OPTIONS_V2_INTL
RETRO_ENVIRONMENT_SET_DISK_CONTROL_EXT_INTERFACE
RETRO_ENVIRONMENT_SET_DISK_CONTROL_INTERFACE
RETRO_ENVIRONMENT_SET_FASTFORWARDING_OVERRIDE
RETRO_ENVIRONMENT_SET_FRAME_TIME_CALLBACK
RETRO_ENVIRONMENT_SET_GEOMETRY
RETRO_ENVIRONMENT_SET_HW_RENDER
RETRO_ENVIRONMENT_SET_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE
RETRO_ENVIRONMENT_SET_HW_SHARED_CONTEXT
RETRO_ENVIRONMENT_SET_INPUT_DESCRIPTORS
RETRO_ENVIRONMENT_SET_KEYBOARD_CALLBACK
RETRO_ENVIRONMENT_SET_MEMORY_MAPS
RETRO_ENVIRONMENT_SET_MESSAGE
RETRO_ENVIRONMENT_SET_MESSAGE_EXT
RETRO_ENVIRONMENT_SET_MINIMUM_AUDIO_LATENCY
RETRO_ENVIRONMENT_SET_PERFORMANCE_LEVEL
RETRO_ENVIRONMENT_SET_PIXEL_FORMAT
RETRO_ENVIRONMENT_SET_PROC_ADDRESS_CALLBACK
RETRO_ENVIRONMENT_SET_ROTATION
RETRO_ENVIRONMENT_SET_SERIALIZATION_QUIRKS
RETRO_ENVIRONMENT_SET_SUBSYSTEM_INFO
RETRO_ENVIRONMENT_SET_SUPPORT_ACHIEVEMENTS
RETRO_ENVIRONMENT_SET_SUPPORT_NO_GAME
RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO
RETRO_ENVIRONMENT_SET_VARIABLE
RETRO_ENVIRONMENT_SET_VARIABLES
RETRO_ENVIRONMENT_SHUTDOWN
RETRO_HW_FRAME_BUFFER_VALID
Pass this to retro_video_refresh_t if rendering to hardware. Passing NULL to retro_video_refresh_t is still a frame dupe as normal.
RETRO_MEMDESC_ALIGN_2
RETRO_MEMDESC_ALIGN_4
RETRO_MEMDESC_ALIGN_8
RETRO_MEMDESC_BIGENDIAN
RETRO_MEMDESC_CONST
RETRO_MEMDESC_MINSIZE_2
RETRO_MEMDESC_MINSIZE_4
RETRO_MEMDESC_MINSIZE_8
RETRO_MEMDESC_SAVE_RAM
RETRO_MEMDESC_SYSTEM_RAM
RETRO_MEMDESC_VIDEO_RAM
RETRO_MEMORY_ACCESS_READ
RETRO_MEMORY_ACCESS_WRITE
RETRO_MEMORY_MASK
RETRO_MEMORY_RTC
RETRO_MEMORY_SAVE_RAM
RETRO_MEMORY_SYSTEM_RAM
RETRO_MEMORY_TYPE_CACHED
RETRO_MEMORY_VIDEO_RAM
RETRO_NUM_CORE_OPTION_VALUES_MAX
RETRO_REGION_NTSC
RETRO_REGION_PAL
RETRO_SENSOR_ACCELEROMETER_X
RETRO_SENSOR_ACCELEROMETER_Y
RETRO_SENSOR_ACCELEROMETER_Z
RETRO_SENSOR_GYROSCOPE_X
RETRO_SENSOR_GYROSCOPE_Y
RETRO_SENSOR_GYROSCOPE_Z
RETRO_SENSOR_ILLUMINANCE
RETRO_SERIALIZATION_QUIRK_CORE_VARIABLE_SIZE
RETRO_SERIALIZATION_QUIRK_ENDIAN_DEPENDENT
RETRO_SERIALIZATION_QUIRK_FRONT_VARIABLE_SIZE
RETRO_SERIALIZATION_QUIRK_INCOMPLETE
RETRO_SERIALIZATION_QUIRK_MUST_INITIALIZE
RETRO_SERIALIZATION_QUIRK_PLATFORM_DEPENDENT
RETRO_SERIALIZATION_QUIRK_SINGLE_SESSION
RETRO_SIMD_AES
RETRO_SIMD_ASIMD
RETRO_SIMD_AVX
RETRO_SIMD_AVX2
RETRO_SIMD_CMOV
RETRO_SIMD_MMX
RETRO_SIMD_MMXEXT
RETRO_SIMD_MOVBE
RETRO_SIMD_NEON
RETRO_SIMD_POPCNT
RETRO_SIMD_PS
RETRO_SIMD_SSE
RETRO_SIMD_SSE2
RETRO_SIMD_SSE3
RETRO_SIMD_SSE4
RETRO_SIMD_SSE42
RETRO_SIMD_SSSE3
RETRO_SIMD_VFPU
RETRO_SIMD_VFPV3
RETRO_SIMD_VFPV4
RETRO_SIMD_VMX
RETRO_SIMD_VMX128
RETRO_THROTTLE_FAST_FORWARD
RETRO_THROTTLE_FRAME_STEPPING
RETRO_THROTTLE_NONE
RETRO_THROTTLE_REWINDING
RETRO_THROTTLE_SLOW_MOTION
RETRO_THROTTLE_UNBLOCKED
RETRO_THROTTLE_VSYNC
RETRO_VFS_FILE_ACCESS_HINT_FREQUENT_ACCESS
RETRO_VFS_FILE_ACCESS_HINT_NONE
RETRO_VFS_FILE_ACCESS_READ
RETRO_VFS_FILE_ACCESS_READ_WRITE
RETRO_VFS_FILE_ACCESS_UPDATE_EXISTING
RETRO_VFS_FILE_ACCESS_WRITE
RETRO_VFS_SEEK_POSITION_CURRENT
RETRO_VFS_SEEK_POSITION_END
RETRO_VFS_SEEK_POSITION_START
RETRO_VFS_STAT_IS_CHARACTER_SPECIAL
RETRO_VFS_STAT_IS_DIRECTORY
RETRO_VFS_STAT_IS_VALID

Functions§

retro_api_version
Must return RETRO_API_VERSION. Used to validate ABI compatibility when the API is revised.
retro_cheat_reset
retro_cheat_set
retro_deinit
retro_get_memory_data
Gets region of memory.
retro_get_memory_size
retro_get_region
Gets region of game.
retro_get_system_av_info
Gets information about system audio/video timings and geometry. Can be called only after retro_load_game() has successfully completed. NOTE: The implementation of this function might not initialize every variable if needed. E.g. geom.aspect_ratio might not be initialized if core doesn’t desire a particular aspect ratio.
retro_get_system_info
Gets statically known system info. Pointers provided in *info must be statically allocated. Can be called at any time, even before retro_init().
retro_init
Library global initialization/deinitialization.
retro_load_game
Loads a game. Return true to indicate successful loading and false to indicate load failure.
retro_load_game_special
Loads a “special” kind of game. Should not be used, except in extreme cases.
retro_reset
Resets the current game.
retro_run
Runs the game for one video frame. During retro_run(), input_poll callback must be called at least once.
retro_serialize
Serializes internal state. If failed, or size is lower than retro_serialize_size(), it should return false, true otherwise.
retro_serialize_size
Returns the amount of data the implementation requires to serialize internal state (save states). Between calls to retro_load_game() and retro_unload_game(), the returned size is never allowed to be larger than a previous returned value, to ensure that the frontend can allocate a save state buffer once.
retro_set_audio_sample
retro_set_audio_sample_batch
retro_set_controller_port_device
Sets device to be used for player ‘port’. By default, RETRO_DEVICE_JOYPAD is assumed to be plugged into all available ports. Setting a particular device type is not a guarantee that libretro cores will only poll input based on that particular device type. It is only a hint to the libretro core when a core cannot automatically detect the appropriate input device type on its own. It is also relevant when a core can change its behavior depending on device type.
retro_set_environment
Sets callbacks. retro_set_environment() is guaranteed to be called before retro_init().
retro_set_input_poll
retro_set_input_state
retro_set_video_refresh
retro_unload_game
Unloads the currently loaded game. Called before retro_deinit(void).
retro_unserialize

Type Aliases§

retro_add_image_index_t
Adds a new valid index (get_num_images()) to the internal disk list. This will increment subsequent return values from get_num_images() by 1. This image index cannot be used until a disk image has been set with replace_image_index.
retro_audio_buffer_status_callback_t
Notifies a libretro core of the current occupancy level of the frontend audio buffer.
retro_audio_callback_t
Notifies libretro that audio data should be written.
retro_audio_sample_batch_t
Renders multiple audio frames in one go.
retro_audio_sample_t
Renders a single audio frame. Should only be used if implementation generates a single sample at a time. Format is signed 16-bit native endian.
retro_audio_set_state_callback_t
True: Audio driver in frontend is active, and callback is expected to be called regularily. False: Audio driver in frontend is paused or inactive. Audio callback will not be called until set_state has been called with true. Initial state is false (inactive).
retro_camera_frame_opengl_texture_t
A callback for when OpenGL textures are used.
retro_camera_frame_raw_framebuffer_t
A callback for raw framebuffer data. buffer points to an XRGB8888 buffer. Width, height and pitch are similar to retro_video_refresh_t. First pixel is top-left origin.
retro_camera_lifetime_status_t
Callback which signals when the camera driver is initialized and/or deinitialized. retro_camera_start_t can be called in initialized callback.
retro_camera_start_t
Starts the camera driver. Can only be called in retro_run().
retro_camera_stop_t
Stops the camera driver. Can only be called in retro_run().
retro_core_options_update_display_callback_t
Used by the frontend to monitor changes in core option visibility. May be called each time any core option value is set via the frontend.
retro_environment_t
Environment callback. Gives implementations a way of performing uncommon tasks. Extensible.
retro_frame_time_callback_t
retro_get_cpu_features_t
Returns a bit-mask of detected CPU features (RETRO_SIMD_*).
retro_get_eject_state_t
Gets current eject state. The initial state is ‘not ejected’.
retro_get_image_index_t
Gets current disk index. First disk is index 0. If return value is >= get_num_images(), no disk is currently inserted.
retro_get_image_label_t
Fetches a core-provided ‘label’ for the specified disk image file. In the simplest case this may be a file name (without extension), but for cores with more complex content requirements information may be provided to facilitate user disk swapping - for example, a core running floppy-disk-based content may uniquely label save disks, data disks, level disks, etc. with names corresponding to in-game disk change prompts (so the frontend can provide better user guidance than a ‘dumb’ disk index value). Returns ‘false’ if index is invalid (index >= get_num_images()) or label is otherwise unavailable.
retro_get_image_path_t
Fetches the path of the specified disk image file. Returns ‘false’ if index is invalid (index >= get_num_images()) or path is otherwise unavailable.
retro_get_num_images_t
Gets total number of images which are available to use.
retro_get_proc_address_t
libretro API extension functions: (None here so far).
retro_hw_context_reset_t
Invalidates the current HW context. Any GL state is lost, and must not be deinitialized explicitly. If explicit deinitialization is desired by the libretro core, it should implement context_destroy callback. If called, all GPU resources must be reinitialized. Usually called when frontend reinits video driver. Also called first time video driver is initialized, allowing libretro core to initialize resources.
retro_hw_get_current_framebuffer_t
Gets current framebuffer which is to be rendered to. Could change every frame potentially.
retro_hw_get_proc_address_t
Get a symbol from HW context.
retro_input_poll_t
Polls input.
retro_input_state_t
Queries for input for player ‘port’. device will be masked with RETRO_DEVICE_MASK.
retro_keyboard_event_t
Callback type passed in RETRO_ENVIRONMENT_SET_KEYBOARD_CALLBACK. Called by the frontend in response to keyboard events. down is set if the key is being pressed, or false if it is being released. keycode is the RETROK value of the char. character is the text character of the pressed key. (UTF-32). key_modifiers is a set of RETROKMOD values or’ed together.
retro_location_get_position_t
Get the position of the current location. Will set parameters to 0 if no new location update has happened since the last time.
retro_location_lifetime_status_t
Callback which signals when the location driver is initialized and/or deinitialized. retro_location_start_t can be called in initialized callback.
retro_location_set_interval_t
Sets the interval of time and/or distance at which to update/poll location-based data.
retro_location_start_t
Start location services. The device will start listening for changes to the current location at regular intervals (which are defined with retro_location_set_interval_t).
retro_location_stop_t
Stop location services. The device will stop listening for changes to the current location.
retro_log_printf_t
Logging function. Takes log level argument as well.
retro_midi_flush_t
Flushes previously written data. Returns true if successful, false otherwise.
retro_midi_input_enabled_t
Retrieves the current state of the MIDI input. Returns true if it’s enabled, false otherwise.
retro_midi_output_enabled_t
Retrieves the current state of the MIDI output. Returns true if it’s enabled, false otherwise
retro_midi_read_t
Reads next byte from the input stream. Returns true if byte is read, false otherwise.
retro_midi_write_t
Writes byte to the output stream. ‘delta_time’ is in microseconds and represent time elapsed since previous write. Returns true if byte is written, false otherwise.
retro_perf_get_counter_t
A simple counter. Usually nanoseconds, but can also be CPU cycles. Can be used directly if desired (when creating a more sophisticated performance counter system).
retro_perf_get_time_usec_t
Returns current time in microseconds. Tries to use the most accurate timer available.
retro_perf_log_t
Asks frontend to log and/or display the state of performance counters. Performance counters can always be poked into manually as well.
retro_perf_register_t
Register a performance counter. ident field must be set with a discrete value and other values in retro_perf_counter must be 0. Registering can be called multiple times. To avoid calling to frontend redundantly, you can check registered field first.
retro_perf_start_t
Starts a registered counter.
retro_perf_stop_t
Stops a registered counter.
retro_perf_tick_t
retro_proc_address_t
retro_replace_image_index_t
Replaces the disk image associated with index. Arguments to pass in info have same requirements as retro_load_game(). Virtual disk tray must be ejected when calling this.
retro_savestate_context_REPR_TYPE
retro_sensor_get_input_t
retro_set_eject_state_t
If ejected is true, “ejects” the virtual disk tray. When ejected, the disk image index can be set.
retro_set_image_index_t
Sets image index. Can only be called when disk is ejected. The implementation supports setting “no disk” by using an index >= get_num_images().
retro_set_initial_image_t
Sets initial image to insert in drive when calling core_load_game(). Since we cannot pass the initial index when loading content (this would require a major API change), this is set by the frontend before calling the core’s retro_load_game()/retro_load_game_special() implementation. A core should therefore cache the index/path values and handle them inside retro_load_game()/retro_load_game_special().
retro_set_led_state_t
retro_set_rumble_state_t
Sets rumble state for joypad plugged in port ‘port’. Rumble effects are controlled independently, and setting e.g. strong rumble does not override weak rumble. Strength has a range of [0, 0xffff].
retro_set_sensor_state_t
retro_time_t
retro_usec_t
Notifies a libretro core of time spent since last invocation of retro_run() in microseconds.
retro_vfs_close_t
Close the file and release its resources. Must be called if open_file returns non-NULL. Returns 0 on success, -1 on failure. Whether the call succeeds ot not, the handle passed as parameter becomes invalid and should no longer be used. Introduced in VFS API v1
retro_vfs_closedir_t
Close the directory and release its resources. Must be called if opendir returns non-NULL. Returns 0 on success, -1 on failure. Whether the call succeeds ot not, the handle passed as parameter becomes invalid and should no longer be used. Introduced in VFS API v3
retro_vfs_dirent_get_name_t
Get the name of the last entry read. Returns a string on success, or NULL for error. The returned string pointer is valid until the next call to readdir or closedir. Introduced in VFS API v3
retro_vfs_dirent_is_dir_t
Check if the last entry read was a directory. Returns true if it was, false otherwise (or on error). Introduced in VFS API v3
retro_vfs_flush_t
Flush pending writes to file, if using buffered IO. Returns 0 on sucess, or -1 on failure. Introduced in VFS API v1
retro_vfs_get_path_t
Get path from opaque handle. Returns the exact same path passed to file_open when getting the handle Introduced in VFS API v1
retro_vfs_mkdir_t
Create the specified directory. Returns 0 on success, -1 on unknown failure, -2 if already exists. Introduced in VFS API v3
retro_vfs_open_t
Open a file for reading or writing. If path points to a directory, this will fail. Returns the opaque file handle, or NULL for error. Introduced in VFS API v1
retro_vfs_opendir_t
Open the specified directory for listing. Returns the opaque dir handle, or NULL for error. Support for the include_hidden argument may vary depending on the platform. Introduced in VFS API v3
retro_vfs_read_t
Read data from a file. Returns the number of bytes read, or -1 for error. Introduced in VFS API v1
retro_vfs_readdir_t
Read the directory entry at the current position, and move the read pointer to the next position. Returns true on success, false if already on the last entry. Introduced in VFS API v3
retro_vfs_remove_t
Delete the specified file. Returns 0 on success, -1 on failure Introduced in VFS API v1
retro_vfs_rename_t
Rename the specified file. Returns 0 on success, -1 on failure Introduced in VFS API v1
retro_vfs_seek_t
Set the current read/write position for the file. Returns the new position, -1 for error. Introduced in VFS API v1
retro_vfs_size_t
Return the size of the file in bytes, or -1 for error. Introduced in VFS API v1
retro_vfs_stat_t
Stat the specified file. Retruns a bitmask of RETRO_VFS_STAT_* flags, none are set if path was not valid. Additionally stores file size in given variable, unless NULL is given. Introduced in VFS API v3
retro_vfs_tell_t
Get the current read / write position for the file. Returns -1 for error. Introduced in VFS API v1
retro_vfs_truncate_t
Truncate file to specified size. Returns 0 on success or -1 on error Introduced in VFS API v2
retro_vfs_write_t
Write data to a file. Returns the number of bytes written, or -1 for error. Introduced in VFS API v1
retro_video_refresh_t
Render a frame. Pixel format is 15-bit 0RGB1555 native endian unless changed (see RETRO_ENVIRONMENT_SET_PIXEL_FORMAT).