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()
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.
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
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()
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.
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.
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.
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.
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).
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.
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.
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.
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.
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).
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.
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).
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.
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.
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().
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].
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
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
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
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
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
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
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