mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 16:39:43 +00:00
(Settings data) Create enum for settings list
This commit is contained in:
parent
6cb17bc4cb
commit
70e7b4a26e
@ -777,7 +777,7 @@ static void RunActionSheet(const char* title, const struct string_list* items, U
|
||||
settings = [NSMutableArray arrayWithObjects:BOXSTRING(""), nil];
|
||||
[self.sections addObject:settings];
|
||||
|
||||
for (setting = setting_data; setting->type < ST_NONE; setting++)
|
||||
for (setting = &setting_data[0]; setting->type < ST_NONE; setting++)
|
||||
if (setting->type == ST_GROUP)
|
||||
[settings addObject:[RAMenuItemBasic itemWithDescription:BOXSTRING(setting->name) action:
|
||||
^{
|
||||
|
@ -428,12 +428,12 @@ WITH_FLAGS(SD_FLAG_HAS_RANGE)
|
||||
const rarch_setting_t* setting_data_get_list(void)
|
||||
{
|
||||
int i, player, index;
|
||||
static rarch_setting_t list[512];
|
||||
static rarch_setting_t list[SETTINGS_DATA_LIST_SIZE];
|
||||
static bool initialized = false;
|
||||
|
||||
if (!initialized)
|
||||
{
|
||||
for (i = 0; i < 512; i++)
|
||||
for (i = 0; i < SETTINGS_DATA_LIST_SIZE; i++)
|
||||
{
|
||||
list[i].type = ST_NONE;
|
||||
list[i].name = NULL;
|
||||
@ -460,7 +460,7 @@ const rarch_setting_t* setting_data_get_list(void)
|
||||
START_SUB_GROUP("Drivers")
|
||||
CONFIG_STRING(g_settings.video.driver, "video_driver", "Video Driver", config_get_default_video())
|
||||
#ifdef HAVE_OPENGL
|
||||
CONFIG_STRING(g_settings.video.gl_context, "video_gl_context", "OpenGL Driver", "")
|
||||
CONFIG_STRING(g_settings.video.gl_context, "video_gl_context", "OpenGL Context Driver", "")
|
||||
#endif
|
||||
CONFIG_STRING(g_settings.audio.driver, "audio_driver", "Audio Driver", config_get_default_audio())
|
||||
CONFIG_STRING(g_settings.input.driver, "input_driver", "Input Driver", config_get_default_input())
|
||||
|
@ -18,6 +18,10 @@
|
||||
|
||||
#include "general.h"
|
||||
|
||||
#define SETTINGS_DATA_LIST_SIZE 512
|
||||
|
||||
#define BINDFOR(s) (*(&s)->value.keybind)
|
||||
|
||||
enum setting_type
|
||||
{
|
||||
ST_NONE = 0,
|
||||
@ -84,7 +88,6 @@ typedef struct rarch_setting_t
|
||||
} value;
|
||||
} rarch_setting_t;
|
||||
|
||||
#define BINDFOR(s) (*(&s)->value.keybind)
|
||||
|
||||
|
||||
void setting_data_reset_setting(const rarch_setting_t* setting);
|
||||
|
Loading…
Reference in New Issue
Block a user