aboutsummaryrefslogtreecommitdiff
path: root/libretro-common
diff options
context:
space:
mode:
authorjdgleaver2019-08-14 14:10:51 +0100
committerjdgleaver2019-08-14 14:10:51 +0100
commitfbe066283d40e16eaeafff3926800c93c9f600a3 (patch)
tree2919babd5f961a041e3348e4cc3d6bc1f6a574ee /libretro-common
parent91d629e78ac3f5dafe11ed2a36a348df3ee95564 (diff)
downloadpcsx_rearmed-fbe066283d40e16eaeafff3926800c93c9f600a3.tar.gz
pcsx_rearmed-fbe066283d40e16eaeafff3926800c93c9f600a3.tar.bz2
pcsx_rearmed-fbe066283d40e16eaeafff3926800c93c9f600a3.zip
Update 'libretro_core_options.h' to v1.3 format
Diffstat (limited to 'libretro-common')
-rw-r--r--libretro-common/include/libretro.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/libretro-common/include/libretro.h b/libretro-common/include/libretro.h
index 1fd2f5b..d0f1042 100644
--- a/libretro-common/include/libretro.h
+++ b/libretro-common/include/libretro.h
@@ -1117,7 +1117,7 @@ enum retro_mod
* This may be still be done regardless of the core options
* interface version.
*
- * If version is 1 however, core options may instead be set by
+ * If version is >= 1 however, core options may instead be set by
* passing an array of retro_core_option_definition structs to
* RETRO_ENVIRONMENT_SET_CORE_OPTIONS, or a 2D array of
* retro_core_option_definition structs to RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL.
@@ -1132,8 +1132,8 @@ enum retro_mod
* GET_VARIABLE.
* This allows the frontend to present these variables to
* a user dynamically.
- * This should only be called if RETRO_ENVIRONMENT_GET_ENHANCED_CORE_OPTIONS
- * returns an API version of 1.
+ * This should only be called if RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION
+ * returns an API version of >= 1.
* This should be called instead of RETRO_ENVIRONMENT_SET_VARIABLES.
* This should be called the first time as early as
* possible (ideally in retro_set_environment).
@@ -1169,8 +1169,6 @@ enum retro_mod
* i.e. it should be feasible to cycle through options
* without a keyboard.
*
- * First entry should be treated as a default.
- *
* Example entry:
* {
* "foo_option",
@@ -1196,8 +1194,8 @@ enum retro_mod
* GET_VARIABLE.
* This allows the frontend to present these variables to
* a user dynamically.
- * This should only be called if RETRO_ENVIRONMENT_GET_ENHANCED_CORE_OPTIONS
- * returns an API version of 1.
+ * This should only be called if RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION
+ * returns an API version of >= 1.
* This should be called instead of RETRO_ENVIRONMENT_SET_VARIABLES.
* This should be called the first time as early as
* possible (ideally in retro_set_environment).
@@ -2504,8 +2502,20 @@ struct retro_core_option_display
};
/* Maximum number of values permitted for a core option
- * NOTE: This may be increased on a core-by-core basis
- * if required (doing so has no effect on the frontend) */
+ * > Note: We have to set a maximum value due the limitations
+ * of the C language - i.e. it is not possible to create an
+ * array of structs each containing a variable sized array,
+ * so the retro_core_option_definition values array must
+ * have a fixed size. The size limit of 128 is a balancing
+ * act - it needs to be large enough to support all 'sane'
+ * core options, but setting it too large may impact low memory
+ * platforms. In practise, if a core option has more than
+ * 128 values then the implementation is likely flawed.
+ * To quote the above API reference:
+ * "The number of possible options should be very limited
+ * i.e. it should be feasible to cycle through options
+ * without a keyboard."
+ */
#define RETRO_NUM_CORE_OPTION_VALUES_MAX 128
struct retro_core_option_value