From a17e3b4837094c1bc7d27504fa888c28ef22ae97 Mon Sep 17 00:00:00 2001 From: Mahyar Koshkouei Date: Sat, 25 Apr 2020 10:54:27 +0100 Subject: [PATCH] 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 --- docs/development/cores/developing-cores.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/development/cores/developing-cores.md b/docs/development/cores/developing-cores.md index 35285854..bcf81375 100644 --- a/docs/development/cores/developing-cores.md +++ b/docs/development/cores/developing-cores.md @@ -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, there’s 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.