Fix order of libretro startup

retro_set_*() must be called before retro_init(). This change fixes the
order in which these functions are listed.
This fixes issue #471.

Signed-off-by: Mahyar Koshkouei <mk@deltabeard.com>
This commit is contained in:
Mahyar Koshkouei 2020-04-25 10:54:27 +01:00
parent 2519835515
commit a17e3b4837

View File

@ -62,14 +62,14 @@ The program flow of a frontend using the libretro API can be expressed as follow
This function should return RETRO_API_VERSION, defined in libretro.h. It is used by the frontend to determine if ABI/API are mismatched. The ver- sion will be bumped should there be any non- compatible changes to the API. Changes to retro_* structures, as well as changes in publically visible functions and/or their arguments will warrant a bump in API version.
#### `retro_init()`
This function is called once, and gives the implementation a chance to initialize data structures.
#### `retro_set_*()`
Libretro is callback based. The frontend will set all callbacks at this stage, and the implementation must store these function pointers somewhere. The frontend can, at a later stage, call these.
#### `retro_init()`
This function is called once, and gives the implementation a chance to initialize data structures.
#### Environment callback
While libretro has callbacks for video, audio and input, theres a callback type dubbed the environment callback. This callback (`retro_environment_t`) is a generic way for the libretro implementation to access features of the API that are considered too obscure to deserve its own symbols. It can be extended without breaking ABI. The callback has a return type of `bool` which tells if the frontend recognized the request given to it.