RetroArch/menu/menu_setting.c

6713 lines
234 KiB
C
Raw Normal View History

/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
2017-01-22 12:40:32 +00:00
* Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2014-2017 - Jean-André Santoni
* Copyright (C) 2016-2017 - Brad Parker
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
2016-05-01 13:46:42 +00:00
#ifdef _WIN32
#include <direct.h>
#else
#include <unistd.h>
#endif
#include <lists/file_list.h>
2015-06-02 18:26:27 +00:00
#include <file/file_path.h>
#include <string/stdstring.h>
2016-04-27 20:29:58 +00:00
#include <lists/string_list.h>
2015-06-02 18:26:27 +00:00
2016-09-01 03:36:52 +00:00
#include <compat/strl.h>
#include <audio/audio_resampler.h>
2016-09-08 03:43:10 +00:00
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
2016-09-11 19:06:16 +00:00
#if defined(__CELLOS_LV2__)
#include <sdk_version.h>
#if (CELL_SDK_VERSION > 0x340000)
#include <sysutil/sysutil_bgmplayback.h>
#endif
#endif
2016-02-03 13:36:34 +00:00
#include "../frontend/frontend_driver.h"
2015-09-06 12:59:20 +00:00
2016-09-15 18:35:39 +00:00
#include "widgets/menu_input_bind_dialog.h"
2016-02-03 13:36:34 +00:00
#include "menu_setting.h"
2015-12-06 16:55:27 +00:00
#include "menu_driver.h"
2015-09-26 23:10:15 +00:00
#include "menu_animation.h"
#include "menu_display.h"
2015-06-13 17:12:10 +00:00
#include "menu_input.h"
2015-12-09 08:53:43 +00:00
#include "menu_navigation.h"
2015-06-02 18:26:27 +00:00
2016-09-06 04:11:44 +00:00
#include "../core.h"
2016-09-01 03:36:52 +00:00
#include "../configuration.h"
#include "../msg_hash.h"
2015-12-06 21:48:57 +00:00
#include "../defaults.h"
2015-06-02 18:26:27 +00:00
#include "../driver.h"
2016-09-17 12:57:53 +00:00
#include "../dirs.h"
2016-09-17 10:35:29 +00:00
#include "../paths.h"
2015-06-02 18:26:27 +00:00
#include "../dynamic.h"
2016-12-12 11:29:37 +00:00
#include "../list_special.h"
2016-09-01 03:36:52 +00:00
#include "../runloop.h"
#include "../verbosity.h"
#include "../camera/camera_driver.h"
2016-09-21 14:06:14 +00:00
#include "../wifi/wifi_driver.h"
#include "../location/location_driver.h"
#include "../record/record_driver.h"
2015-11-23 18:40:09 +00:00
#include "../audio/audio_driver.h"
#include "../input/input_config.h"
#include "../tasks/tasks_internal.h"
2015-06-02 18:26:27 +00:00
#include "../config.def.h"
#include "../ui/ui_companion_driver.h"
2016-05-10 06:53:14 +00:00
#include "../performance_counters.h"
2016-08-29 01:07:20 +00:00
#include "../setting_list.h"
#include "../lakka.h"
#include "../retroarch.h"
2015-06-02 18:26:27 +00:00
#include "../tasks/tasks_internal.h"
2016-10-26 05:32:42 +00:00
struct bool_entry
{
bool *target;
enum msg_hash_enums name_enum_idx;
enum msg_hash_enums SHORT_enum_idx;
bool default_value;
enum msg_hash_enums off_enum_idx;
enum msg_hash_enums on_enum_idx;
uint32_t flags;
};
2016-10-26 05:58:21 +00:00
struct string_options_entry
{
char *target;
size_t len;
enum msg_hash_enums name_enum_idx;
enum msg_hash_enums SHORT_enum_idx;
const char *default_value;
const char *values;
};
#ifdef HAVE_CHEEVOS
static void setting_get_string_representation_cheevos_password(void *data,
char *s, size_t len)
{
rarch_setting_t *setting = (rarch_setting_t*)data;
if (!setting)
return;
2016-12-14 15:19:32 +00:00
if (!string_is_empty(setting->value.target.string))
strlcpy(s, "********", len);
else
*setting->value.target.string = '\0';
}
#endif
2016-08-29 01:07:20 +00:00
static void setting_get_string_representation_uint_video_monitor_index(void *data,
char *s, size_t len)
{
rarch_setting_t *setting = (rarch_setting_t*)data;
2015-10-11 11:10:46 +00:00
if (!setting)
2016-08-29 01:07:20 +00:00
return;
2016-08-29 01:07:20 +00:00
if (*setting->value.target.unsigned_integer)
snprintf(s, len, "%u",
*setting->value.target.unsigned_integer);
else
strlcpy(s, "0 (Auto)", len);
2015-09-28 00:10:44 +00:00
}
static void setting_get_string_representation_uint_custom_viewport_width(void *data,
char *s, size_t len)
{
2016-11-08 18:42:58 +00:00
struct retro_game_geometry *geom = NULL;
struct retro_system_av_info *av_info = NULL;
rarch_setting_t *setting = (rarch_setting_t*)data;
if (!setting)
return;
2016-11-08 18:42:58 +00:00
av_info = video_viewport_get_system_av_info();
geom = (struct retro_game_geometry*)&av_info->geometry;
if (*setting->value.target.unsigned_integer%geom->base_width == 0)
snprintf(s, len, "%u (%ux)",
*setting->value.target.unsigned_integer,
*setting->value.target.unsigned_integer / geom->base_width);
else
snprintf(s, len, "%u",
*setting->value.target.unsigned_integer);
}
static void setting_get_string_representation_uint_custom_viewport_height(void *data,
char *s, size_t len)
{
2016-11-08 18:42:58 +00:00
struct retro_game_geometry *geom = NULL;
struct retro_system_av_info *av_info = NULL;
rarch_setting_t *setting = (rarch_setting_t*)data;
if (!setting)
return;
2016-11-08 18:42:58 +00:00
av_info = video_viewport_get_system_av_info();
geom = (struct retro_game_geometry*)&av_info->geometry;
if (*setting->value.target.unsigned_integer%geom->base_height == 0)
snprintf(s, len, "%u (%ux)",
*setting->value.target.unsigned_integer,
*setting->value.target.unsigned_integer / geom->base_height);
else
snprintf(s, len, "%u",
*setting->value.target.unsigned_integer);
}
static int setting_uint_action_left_custom_viewport_width(void *data, bool wraparound)
2015-09-28 00:10:44 +00:00
{
video_viewport_t vp;
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
video_viewport_t *custom = video_viewport_get_custom();
settings_t *settings = config_get_ptr();
struct retro_game_geometry *geom = (struct retro_game_geometry*)
&av_info->geometry;
if (!settings || !av_info)
return -1;
2016-05-08 12:00:51 +00:00
video_driver_get_viewport_info(&vp);
if (custom->width <= 1)
custom->width = 1;
else if (settings->video.scale_integer)
{
if (custom->width > geom->base_width)
custom->width -= geom->base_width;
}
else
custom->width -= 1;
aspectratio_lut[ASPECT_RATIO_CUSTOM].value =
(float)custom->width / custom->height;
return 0;
2015-09-28 00:10:44 +00:00
}
static int setting_uint_action_right_custom_viewport_width(void *data, bool wraparound)
2015-09-28 00:10:44 +00:00
{
video_viewport_t vp;
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
video_viewport_t *custom = video_viewport_get_custom();
settings_t *settings = config_get_ptr();
struct retro_game_geometry *geom = (struct retro_game_geometry*)
&av_info->geometry;
if (!settings || !av_info)
return -1;
2016-05-08 12:00:51 +00:00
video_driver_get_viewport_info(&vp);
if (settings->video.scale_integer)
custom->width += geom->base_width;
else
custom->width += 1;
aspectratio_lut[ASPECT_RATIO_CUSTOM].value =
(float)custom->width / custom->height;
return 0;
2015-09-28 00:10:44 +00:00
}
static int setting_uint_action_left_custom_viewport_height(void *data, bool wraparound)
2015-06-03 09:59:14 +00:00
{
video_viewport_t vp;
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
video_viewport_t *custom = video_viewport_get_custom();
settings_t *settings = config_get_ptr();
struct retro_game_geometry *geom = (struct retro_game_geometry*)
&av_info->geometry;
2015-06-06 17:34:23 +00:00
if (!settings || !av_info)
return -1;
2015-06-03 09:59:14 +00:00
2016-05-08 12:00:51 +00:00
video_driver_get_viewport_info(&vp);
if (custom->height <= 1)
custom->height = 1;
else if (settings->video.scale_integer)
{
if (custom->height > geom->base_height)
custom->height -= geom->base_height;
}
else
custom->height -= 1;
2015-09-28 00:32:19 +00:00
aspectratio_lut[ASPECT_RATIO_CUSTOM].value =
(float)custom->width / custom->height;
return 0;
}
2015-06-03 09:59:14 +00:00
static int setting_uint_action_right_custom_viewport_height(void *data, bool wraparound)
{
video_viewport_t vp;
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
video_viewport_t *custom = video_viewport_get_custom();
settings_t *settings = config_get_ptr();
struct retro_game_geometry *geom = (struct retro_game_geometry*)
&av_info->geometry;
2015-06-03 09:59:14 +00:00
if (!settings || !av_info)
return -1;
2016-05-08 12:00:51 +00:00
video_driver_get_viewport_info(&vp);
if (settings->video.scale_integer)
custom->height += geom->base_height;
else
custom->height += 1;
aspectratio_lut[ASPECT_RATIO_CUSTOM].value =
(float)custom->width / custom->height;
2015-06-03 09:59:14 +00:00
return 0;
2014-10-28 18:08:18 +00:00
}
2016-08-06 01:05:27 +00:00
#if !defined(RARCH_CONSOLE)
2016-04-27 20:29:58 +00:00
static int setting_string_action_left_audio_device(void *data, bool wraparound)
{
2016-04-27 20:40:02 +00:00
int audio_device_index;
struct string_list *ptr = NULL;
rarch_setting_t *setting = (rarch_setting_t*)data;
2016-05-08 14:02:46 +00:00
if (!audio_driver_get_devices_list((void**)&ptr))
2016-04-27 20:40:02 +00:00
return -1;
2016-04-27 20:29:58 +00:00
if (!ptr)
return -1;
/* Get index in the string list */
2016-04-27 20:40:02 +00:00
audio_device_index = string_list_find_elem(ptr,setting->value.target.string) - 1;
2016-04-27 20:29:58 +00:00
audio_device_index--;
/* Reset index if needed */
if (audio_device_index < 0)
audio_device_index = ptr->size - 1;
strlcpy(setting->value.target.string, ptr->elems[audio_device_index].data, setting->size);
return 0;
}
static int setting_string_action_right_audio_device(void *data, bool wraparound)
{
2016-04-27 20:40:02 +00:00
int audio_device_index;
struct string_list *ptr = NULL;
2016-04-27 20:29:58 +00:00
rarch_setting_t *setting = (rarch_setting_t*)data;
2016-05-08 14:02:46 +00:00
if (!audio_driver_get_devices_list((void**)&ptr))
2016-04-27 20:40:02 +00:00
return -1;
2016-04-27 20:29:58 +00:00
if (!ptr)
return -1;
/* Get index in the string list */
2016-04-27 20:40:02 +00:00
audio_device_index = string_list_find_elem(ptr,setting->value.target.string) -1;
2016-04-27 20:29:58 +00:00
audio_device_index++;
/* Reset index if needed */
2016-05-14 14:49:29 +00:00
if (audio_device_index == (signed)ptr->size)
2016-04-27 20:29:58 +00:00
audio_device_index = 0;
strlcpy(setting->value.target.string, ptr->elems[audio_device_index].data, setting->size);
return 0;
}
2016-08-06 01:05:27 +00:00
#endif
2016-04-27 20:29:58 +00:00
static int setting_string_action_left_driver(void *data,
bool wraparound)
{
2016-02-01 11:56:17 +00:00
driver_ctx_info_t drv;
rarch_setting_t *setting = (rarch_setting_t*)data;
if (!setting)
return -1;
2016-02-01 11:56:17 +00:00
drv.label = setting->name;
2016-03-24 18:55:33 +00:00
drv.s = setting->value.target.string;
2016-02-01 11:56:17 +00:00
drv.len = setting->size;
if (!driver_ctl(RARCH_DRIVER_CTL_FIND_PREV, &drv))
return -1;
if (setting->change_handler)
setting->change_handler(setting);
return 0;
}
static int setting_string_action_right_driver(void *data,
bool wraparound)
{
2016-02-01 11:56:17 +00:00
driver_ctx_info_t drv;
rarch_setting_t *setting = (rarch_setting_t*)data;
if (!setting)
return -1;
2016-02-01 11:56:17 +00:00
drv.label = setting->name;
2016-03-24 18:55:33 +00:00
drv.s = setting->value.target.string;
2016-02-01 11:56:17 +00:00
drv.len = setting->size;
if (!driver_ctl(RARCH_DRIVER_CTL_FIND_NEXT, &drv))
{
settings_t *settings = config_get_ptr();
2016-08-29 18:40:39 +00:00
if (settings && settings->menu.navigation.wraparound.enable)
2016-02-01 11:56:17 +00:00
{
drv.label = setting->name;
2016-03-24 18:55:33 +00:00
drv.s = setting->value.target.string;
2016-02-01 11:56:17 +00:00
drv.len = setting->size;
driver_ctl(RARCH_DRIVER_CTL_FIND_FIRST, &drv);
}
}
2015-06-03 09:19:26 +00:00
if (setting->change_handler)
setting->change_handler(setting);
2015-06-03 09:19:26 +00:00
return 0;
2015-06-02 18:26:27 +00:00
}
2016-08-29 01:07:20 +00:00
static void setting_get_string_representation_uint_video_rotation(void *data,
char *s, size_t len)
2015-06-02 18:26:27 +00:00
{
rarch_setting_t *setting = (rarch_setting_t*)data;
if (setting)
2016-10-28 06:23:54 +00:00
{
char rotation_lut[4][32] =
{
"Normal",
"90 deg",
"180 deg",
"270 deg"
};
2016-08-29 01:07:20 +00:00
strlcpy(s, rotation_lut[*setting->value.target.unsigned_integer],
len);
2016-10-28 06:23:54 +00:00
}
2015-06-02 18:26:27 +00:00
}
2016-08-29 01:07:20 +00:00
static void setting_get_string_representation_uint_aspect_ratio_index(void *data,
char *s, size_t len)
2015-06-02 18:26:27 +00:00
{
rarch_setting_t *setting = (rarch_setting_t*)data;
if (setting)
2016-08-29 01:07:20 +00:00
strlcpy(s,
aspectratio_lut[*setting->value.target.unsigned_integer].name,
len);
}
2016-08-29 01:07:20 +00:00
static void setting_get_string_representation_uint_libretro_device(void *data,
char *s, size_t len)
{
2016-08-29 01:07:20 +00:00
unsigned index_offset;
const struct retro_controller_description *desc = NULL;
const char *name = NULL;
rarch_system_info_t *system = NULL;
2016-08-29 01:07:20 +00:00
rarch_setting_t *setting = (rarch_setting_t*)data;
settings_t *settings = config_get_ptr();
if (!setting)
return;
2015-06-02 18:26:27 +00:00
index_offset = setting->index_offset;
2016-08-29 01:07:20 +00:00
if (runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system)
&& system)
{
2016-08-29 01:07:20 +00:00
if (index_offset < system->ports.size)
desc = libretro_find_controller_description(
&system->ports.data[index_offset],
settings->input.libretro_device
[index_offset]);
}
2015-06-02 18:26:27 +00:00
2016-08-29 01:07:20 +00:00
if (desc)
name = desc->desc;
2016-08-29 01:07:20 +00:00
if (!name)
{
/* Find generic name. */
switch (settings->input.libretro_device[index_offset])
{
case RETRO_DEVICE_NONE:
name = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NONE);
break;
case RETRO_DEVICE_JOYPAD:
name = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RETROPAD);
break;
case RETRO_DEVICE_ANALOG:
name = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RETROPAD_WITH_ANALOG);
break;
default:
name = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_UNKNOWN);
break;
}
}
2016-10-26 04:01:26 +00:00
if (!string_is_empty(name))
strlcpy(s, name, len);
}
2016-08-29 01:07:20 +00:00
static void setting_get_string_representation_uint_analog_dpad_mode(void *data,
char *s, size_t len)
{
2016-08-29 01:07:20 +00:00
const char *modes[3];
rarch_setting_t *setting = (rarch_setting_t*)data;
settings_t *settings = config_get_ptr();
modes[0] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NONE);
modes[1] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LEFT_ANALOG);
modes[2] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RIGHT_ANALOG);
if (setting)
{
unsigned index_offset = setting->index_offset;
2016-08-29 01:07:20 +00:00
strlcpy(s, modes[settings->input.analog_dpad_mode
[index_offset] % ANALOG_DPAD_LAST], len);
}
}
2016-08-29 01:07:20 +00:00
#ifdef HAVE_THREADS
static void setting_get_string_representation_uint_autosave_interval(void *data,
char *s, size_t len)
{
2016-08-29 01:07:20 +00:00
rarch_setting_t *setting = (rarch_setting_t*)data;
if (!setting)
return;
if (*setting->value.target.unsigned_integer)
snprintf(s, len, "%u %s",
*setting->value.target.unsigned_integer, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SECONDS));
else
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF), len);
}
2016-08-29 01:07:20 +00:00
#endif
2016-08-29 01:07:20 +00:00
#ifdef HAVE_LANGEXTRA
static void setting_get_string_representation_uint_user_language(void *data,
char *s, size_t len)
{
2016-08-29 01:07:20 +00:00
const char *modes[RETRO_LANGUAGE_LAST];
settings_t *settings = config_get_ptr();
modes[RETRO_LANGUAGE_ENGLISH] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_ENGLISH);
modes[RETRO_LANGUAGE_JAPANESE] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_JAPANESE);
modes[RETRO_LANGUAGE_FRENCH] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_FRENCH);
modes[RETRO_LANGUAGE_SPANISH] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_SPANISH);
modes[RETRO_LANGUAGE_GERMAN] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_GERMAN);
modes[RETRO_LANGUAGE_ITALIAN] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_ITALIAN);
modes[RETRO_LANGUAGE_DUTCH] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_DUTCH);
modes[RETRO_LANGUAGE_PORTUGUESE] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_PORTUGUESE);
modes[RETRO_LANGUAGE_RUSSIAN] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_RUSSIAN);
modes[RETRO_LANGUAGE_KOREAN] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_KOREAN);
modes[RETRO_LANGUAGE_CHINESE_TRADITIONAL] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_CHINESE_TRADITIONAL);
modes[RETRO_LANGUAGE_CHINESE_SIMPLIFIED] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_CHINESE_SIMPLIFIED);
modes[RETRO_LANGUAGE_ESPERANTO] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_ESPERANTO);
modes[RETRO_LANGUAGE_POLISH] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_POLISH);
modes[RETRO_LANGUAGE_VIETNAMESE] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_VIETNAMESE);
2016-08-29 01:07:20 +00:00
if (settings)
strlcpy(s, modes[settings->user_language], len);
}
2016-08-29 01:07:20 +00:00
#endif
2016-08-29 01:07:20 +00:00
static void setting_get_string_representation_uint_libretro_log_level(void *data,
char *s, size_t len)
{
2016-08-29 01:07:20 +00:00
rarch_setting_t *setting = (rarch_setting_t*)data;
2016-08-29 01:07:20 +00:00
if (setting)
{
static const char *modes[] = {
"0 (Debug)",
"1 (Info)",
"2 (Warning)",
"3 (Error)"
};
strlcpy(s, modes[*setting->value.target.unsigned_integer],
len);
}
}
2016-08-29 01:07:20 +00:00
enum setting_type menu_setting_get_browser_selection_type(rarch_setting_t *setting)
{
2016-08-29 01:07:20 +00:00
if (!setting)
return ST_NONE;
return setting->browser_selection_type;
}
2016-08-29 01:07:20 +00:00
static void menu_settings_info_list_free(rarch_setting_info_t *list_info)
{
2016-08-29 01:07:20 +00:00
if (list_info)
free(list_info);
}
void menu_settings_list_current_add_range(
rarch_setting_t **list,
rarch_setting_info_t *list_info,
float min, float max, float step,
bool enforce_minrange_enable, bool enforce_maxrange_enable)
{
unsigned idx = list_info->index - 1;
(*list)[idx].min = min;
(*list)[idx].step = step;
(*list)[idx].max = max;
(*list)[idx].enforce_minrange = enforce_minrange_enable;
(*list)[idx].enforce_maxrange = enforce_maxrange_enable;
(*list)[list_info->index - 1].flags |= SD_FLAG_HAS_RANGE;
}
static void menu_settings_list_current_add_values(
rarch_setting_t **list,
rarch_setting_info_t *list_info,
const char *values)
{
unsigned idx = list_info->index - 1;
(*list)[idx].values = values;
}
void menu_settings_list_current_add_cmd(
rarch_setting_t **list,
rarch_setting_info_t *list_info,
enum event_command values)
{
unsigned idx = list_info->index - 1;
(*list)[idx].cmd_trigger.idx = values;
}
void menu_settings_list_current_add_enum_idx(
rarch_setting_t **list,
rarch_setting_info_t *list_info,
enum msg_hash_enums enum_idx)
{
unsigned idx = list_info->index - 1;
(*list)[idx].enum_idx = enum_idx;
}
2016-10-26 06:57:55 +00:00
void menu_settings_list_current_add_enum_value_idx(
rarch_setting_t **list,
rarch_setting_info_t *list_info,
enum msg_hash_enums enum_idx)
{
unsigned idx = list_info->index - 1;
(*list)[idx].enum_value_idx = enum_idx;
}
int menu_setting_generic(rarch_setting_t *setting, bool wraparound)
{
uint64_t flags = setting->flags;
if (setting_generic_action_ok_default(setting, wraparound) != 0)
return -1;
if (setting->change_handler)
setting->change_handler(setting);
if ((flags & SD_FLAG_EXIT) && setting->cmd_trigger.triggered)
{
setting->cmd_trigger.triggered = false;
return -1;
}
return 0;
}
static int setting_handler(rarch_setting_t *setting, unsigned action)
{
if (!setting)
return -1;
switch (action)
{
case MENU_ACTION_UP:
if (setting->action_up)
return setting->action_up(setting);
break;
case MENU_ACTION_DOWN:
if (setting->action_down)
return setting->action_down(setting);
break;
case MENU_ACTION_LEFT:
if (setting->action_left)
2016-11-28 00:57:48 +00:00
{
int ret = setting->action_left(setting, false);
2016-12-01 01:43:53 +00:00
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_SAVESTATE_THUMBNAIL_PATH, NULL);
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_SAVESTATE_THUMBNAIL_IMAGE, NULL);
2016-11-28 00:57:48 +00:00
return ret;
}
break;
case MENU_ACTION_RIGHT:
if (setting->action_right)
2016-11-28 00:57:48 +00:00
{
int ret = setting->action_right(setting, false);
2016-12-01 01:43:53 +00:00
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_SAVESTATE_THUMBNAIL_PATH, NULL);
menu_driver_ctl(RARCH_MENU_CTL_UPDATE_SAVESTATE_THUMBNAIL_IMAGE, NULL);
2016-11-28 00:57:48 +00:00
return ret;
}
break;
case MENU_ACTION_SELECT:
if (setting->action_select)
return setting->action_select(setting, true);
break;
case MENU_ACTION_OK:
if (setting->action_ok)
return setting->action_ok(setting, false);
break;
case MENU_ACTION_CANCEL:
if (setting->action_cancel)
return setting->action_cancel(setting);
break;
case MENU_ACTION_START:
if (setting->action_start)
return setting->action_start(setting);
break;
}
return -1;
}
int menu_action_handle_setting(rarch_setting_t *setting,
unsigned type, unsigned action, bool wraparound)
{
if (!setting)
return -1;
2016-10-31 14:01:40 +00:00
switch (setting_get_type(setting))
{
case ST_PATH:
if (action == MENU_ACTION_OK)
{
size_t selection;
2016-10-15 23:09:37 +00:00
menu_displaylist_info_t info = {0};
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
const char *name = setting->name;
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
return -1;
info.list = menu_stack;
info.directory_ptr = selection;
info.type = type;
2016-07-08 18:47:17 +00:00
info.enum_idx = MSG_UNKNOWN;
strlcpy(info.path, setting->default_value.string, sizeof(info.path));
strlcpy(info.label, name, sizeof(info.label));
2016-02-24 22:05:54 +00:00
if (menu_displaylist_ctl(DISPLAYLIST_GENERIC, &info))
2016-02-24 22:19:53 +00:00
menu_displaylist_ctl(DISPLAYLIST_PROCESS, &info);
}
/* fall-through. */
case ST_BOOL:
case ST_INT:
case ST_UINT:
case ST_HEX:
case ST_FLOAT:
case ST_STRING:
case ST_STRING_OPTIONS:
case ST_DIR:
case ST_BIND:
case ST_ACTION:
if (setting_handler(setting, action) == 0)
return menu_setting_generic(setting, wraparound);
break;
default:
break;
}
return -1;
}
static rarch_setting_t *menu_setting_find_internal(rarch_setting_t *setting,
2016-06-17 14:19:48 +00:00
const char *label)
{
uint32_t needle = msg_hash_calculate(label);
rarch_setting_t **list = &setting;
2016-06-17 14:19:48 +00:00
2016-10-31 14:01:40 +00:00
for (; setting_get_type(setting) != ST_NONE; (*list = *list + 1))
{
2016-10-31 14:01:40 +00:00
if ( (needle == setting->name_hash)
&& (setting_get_type(setting) <= ST_GROUP))
{
const char *name = setting->name;
const char *short_description = setting->short_description;
/* make sure this isn't a collision */
2016-01-20 03:54:17 +00:00
if (!string_is_equal(label, name))
continue;
if (string_is_empty(short_description))
return NULL;
if (setting->read_handler)
setting->read_handler(setting);
return setting;
}
}
return NULL;
}
static rarch_setting_t *menu_setting_find_internal_enum(rarch_setting_t *setting,
enum msg_hash_enums enum_idx)
2016-06-14 23:06:58 +00:00
{
rarch_setting_t **list = &setting;
2016-10-31 14:01:40 +00:00
for (; setting_get_type(setting) != ST_NONE; (*list = *list + 1))
2016-06-14 23:06:58 +00:00
{
2016-10-31 14:01:40 +00:00
if (setting->enum_idx == enum_idx && setting_get_type(setting) <= ST_GROUP)
2016-06-14 23:06:58 +00:00
{
const char *short_description = setting->short_description;
2016-06-14 23:06:58 +00:00
if (string_is_empty(short_description))
return NULL;
if (setting->read_handler)
setting->read_handler(setting);
return setting;
}
}
return NULL;
}
2016-03-21 19:53:07 +00:00
/**
* menu_setting_find:
* @settings : pointer to settings
* @name : name of setting to search for
*
* Search for a setting with a specified name (@name).
*
* Returns: pointer to setting if found, NULL otherwise.
**/
rarch_setting_t *menu_setting_find(const char *label)
{
rarch_setting_t *setting = NULL;
menu_entries_ctl(MENU_ENTRIES_CTL_SETTINGS_GET, &setting);
if (!setting || !label)
return NULL;
2016-06-17 14:19:48 +00:00
return menu_setting_find_internal(setting, label);
2016-03-21 19:53:07 +00:00
}
rarch_setting_t *menu_setting_find_enum(enum msg_hash_enums enum_idx)
2016-06-14 23:06:58 +00:00
{
rarch_setting_t *setting = NULL;
menu_entries_ctl(MENU_ENTRIES_CTL_SETTINGS_GET, &setting);
if (!setting || enum_idx == 0)
return NULL;
return menu_setting_find_internal_enum(setting, enum_idx);
}
int menu_setting_set_flags(rarch_setting_t *setting)
2015-06-02 18:26:27 +00:00
{
if (!setting)
return 0;
2016-10-31 14:01:40 +00:00
switch (setting_get_type(setting))
2015-06-02 18:26:27 +00:00
{
case ST_STRING_OPTIONS:
return MENU_SETTING_STRING_OPTIONS;
case ST_ACTION:
return MENU_SETTING_ACTION;
case ST_PATH:
2016-06-20 13:50:37 +00:00
return FILE_TYPE_PATH;
case ST_GROUP:
return MENU_SETTING_GROUP;
case ST_SUB_GROUP:
return MENU_SETTING_SUBGROUP;
default:
break;
}
2015-06-02 18:26:27 +00:00
return 0;
}
2015-06-02 18:26:27 +00:00
int menu_setting_set(unsigned type, const char *label,
unsigned action, bool wraparound)
{
size_t selection;
int ret = 0;
menu_file_list_cbs_t *cbs = NULL;
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
2015-06-02 18:26:27 +00:00
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
return 0;
2015-06-02 18:26:27 +00:00
cbs = menu_entries_get_actiondata_at_offset(selection_buf, selection);
2015-06-02 18:26:27 +00:00
if (!cbs)
return 0;
2015-06-02 18:26:27 +00:00
ret = menu_action_handle_setting(cbs->setting,
type, action, wraparound);
if (ret == -1)
return 0;
return ret;
}
void *setting_get_ptr(rarch_setting_t *setting)
{
if (!setting)
return NULL;
2016-10-31 14:01:40 +00:00
switch (setting_get_type(setting))
{
case ST_BOOL:
2016-03-18 18:01:42 +00:00
return setting->value.target.boolean;
case ST_INT:
2016-03-18 18:01:42 +00:00
return setting->value.target.integer;
case ST_UINT:
2016-03-18 18:01:42 +00:00
return setting->value.target.unsigned_integer;
case ST_FLOAT:
2016-03-18 18:01:42 +00:00
return setting->value.target.fraction;
case ST_BIND:
2016-03-18 18:01:42 +00:00
return setting->value.target.keybind;
case ST_STRING:
case ST_STRING_OPTIONS:
case ST_PATH:
case ST_DIR:
2016-03-18 18:01:42 +00:00
return setting->value.target.string;
default:
break;
2015-06-02 18:26:27 +00:00
}
return NULL;
2015-06-02 18:26:27 +00:00
}
/**
* setting_get_string_representation:
* @setting : pointer to setting
* @s : buffer to write contents of string representation to.
* @len : size of the buffer (@s)
*
* Get a setting value's string representation.
**/
void setting_get_string_representation(void *data, char *s, size_t len)
2015-06-02 18:26:27 +00:00
{
rarch_setting_t* setting = (rarch_setting_t*)data;
if (!setting || !s)
return;
2015-06-02 18:26:27 +00:00
if (setting->get_string_representation)
setting->get_string_representation(setting, s, len);
}
2015-06-06 14:26:55 +00:00
/**
* setting_action_start_savestates:
* @data : pointer to setting
*
* Function callback for 'Savestate' action's 'Action Start'
* function pointer.
*
* Returns: 0 on success, -1 on error.
**/
static int setting_action_start_bind_device(void *data)
{
uint32_t index_offset;
rarch_setting_t *setting = (rarch_setting_t*)data;
settings_t *settings = config_get_ptr();
2015-06-02 18:26:27 +00:00
if (!setting || !settings)
2015-06-02 18:26:27 +00:00
return -1;
index_offset = setting->index_offset;
2015-06-02 18:26:27 +00:00
settings->input.joypad_map[index_offset] = index_offset;
2015-06-02 18:26:27 +00:00
return 0;
}
static int setting_action_start_custom_viewport_width(void *data)
2015-06-02 18:26:27 +00:00
{
video_viewport_t vp;
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
video_viewport_t *custom = video_viewport_get_custom();
settings_t *settings = config_get_ptr();
struct retro_game_geometry *geom = (struct retro_game_geometry*)
&av_info->geometry;
2015-06-02 18:26:27 +00:00
if (!settings || !av_info)
2015-06-02 18:26:27 +00:00
return -1;
2016-05-08 12:00:51 +00:00
video_driver_get_viewport_info(&vp);
2015-06-02 18:26:27 +00:00
if (settings->video.scale_integer)
custom->width = ((custom->width + geom->base_width - 1) /
geom->base_width) * geom->base_width;
else
custom->width = vp.full_width - custom->x;
2015-06-02 18:26:27 +00:00
aspectratio_lut[ASPECT_RATIO_CUSTOM].value =
(float)custom->width / custom->height;
2015-06-02 18:26:27 +00:00
return 0;
}
static int setting_action_start_custom_viewport_height(void *data)
2015-06-02 18:26:27 +00:00
{
video_viewport_t vp;
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
video_viewport_t *custom = video_viewport_get_custom();
settings_t *settings = config_get_ptr();
struct retro_game_geometry *geom = (struct retro_game_geometry*)
&av_info->geometry;
2015-06-02 18:26:27 +00:00
if (!settings || !av_info)
2015-06-02 18:26:27 +00:00
return -1;
2016-05-08 12:00:51 +00:00
video_driver_get_viewport_info(&vp);
2015-06-06 14:26:55 +00:00
if (settings->video.scale_integer)
custom->height = ((custom->height + geom->base_height - 1) /
geom->base_height) * geom->base_height;
else
custom->height = vp.full_height - custom->y;
2015-06-02 18:26:27 +00:00
aspectratio_lut[ASPECT_RATIO_CUSTOM].value =
(float)custom->width / custom->height;
2015-06-02 18:26:27 +00:00
return 0;
}
static int setting_action_start_analog_dpad_mode(void *data)
2015-06-02 18:26:27 +00:00
{
rarch_setting_t *setting = (rarch_setting_t*)data;
if (!setting)
return -1;
2016-03-18 18:01:42 +00:00
*setting->value.target.unsigned_integer = 0;
2015-06-02 18:26:27 +00:00
return 0;
}
static int setting_action_start_libretro_device_type(void *data)
2015-06-02 18:26:27 +00:00
{
2016-01-28 03:13:31 +00:00
retro_ctx_controller_info_t pad;
unsigned index_offset, current_device;
unsigned devices[128], types = 0, port = 0;
const struct retro_controller_info *desc = NULL;
rarch_system_info_t *system = NULL;
rarch_setting_t *setting = (rarch_setting_t*)data;
2015-06-02 18:26:27 +00:00
if (setting_generic_action_start_default(setting) != 0)
return -1;
2015-06-02 18:26:27 +00:00
index_offset = setting->index_offset;
port = index_offset;
2015-06-02 18:26:27 +00:00
devices[types++] = RETRO_DEVICE_NONE;
devices[types++] = RETRO_DEVICE_JOYPAD;
2015-06-02 18:26:27 +00:00
if (runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system)
&& system)
{
/* Only push RETRO_DEVICE_ANALOG as default if we use an
* older core which doesn't use SET_CONTROLLER_INFO. */
if (!system->ports.size)
devices[types++] = RETRO_DEVICE_ANALOG;
2015-06-02 18:26:27 +00:00
2016-06-01 03:18:59 +00:00
if (port < system->ports.size)
desc = &system->ports.data[port];
}
2015-06-02 18:26:27 +00:00
if (desc)
{
unsigned i;
2015-06-02 18:26:27 +00:00
for (i = 0; i < desc->num_types; i++)
{
unsigned id = desc->types[i].id;
if (types < ARRAY_SIZE(devices) &&
id != RETRO_DEVICE_NONE &&
id != RETRO_DEVICE_JOYPAD)
devices[types++] = id;
}
}
2015-06-02 18:26:27 +00:00
current_device = RETRO_DEVICE_JOYPAD;
2015-06-02 18:26:27 +00:00
2017-01-17 18:59:33 +00:00
input_config_set_device(port, current_device);
2016-01-28 03:13:31 +00:00
pad.port = port;
pad.device = current_device;
2016-05-07 23:33:57 +00:00
core_set_controller_port_device(&pad);
return 0;
2015-06-02 18:26:27 +00:00
}
static int setting_action_start_video_refresh_rate_auto(
void *data)
2015-06-02 18:26:27 +00:00
{
2016-05-08 12:00:51 +00:00
video_driver_monitor_reset();
return 0;
2015-06-02 18:26:27 +00:00
}
/**
******* ACTION TOGGLE CALLBACK FUNCTIONS *******
**/
static int setting_action_left_analog_dpad_mode(void *data, bool wraparound)
2015-06-02 18:26:27 +00:00
{
unsigned port = 0;
rarch_setting_t *setting = (rarch_setting_t*)data;
settings_t *settings = config_get_ptr();
2015-06-02 18:26:27 +00:00
if (!setting)
return -1;
2015-06-02 18:26:27 +00:00
port = setting->index_offset;
settings->input.analog_dpad_mode[port] =
(settings->input.analog_dpad_mode
[port] + ANALOG_DPAD_LAST - 1) % ANALOG_DPAD_LAST;
return 0;
2015-06-02 18:26:27 +00:00
}
static int setting_action_right_analog_dpad_mode(void *data, bool wraparound)
2015-06-02 18:26:27 +00:00
{
unsigned port = 0;
rarch_setting_t *setting = (rarch_setting_t*)data;
settings_t *settings = config_get_ptr();
if (!setting)
return -1;
port = setting->index_offset;
settings->input.analog_dpad_mode[port] =
(settings->input.analog_dpad_mode[port] + 1)
% ANALOG_DPAD_LAST;
2015-06-02 18:26:27 +00:00
return 0;
2015-06-02 18:26:27 +00:00
}
static int setting_action_left_libretro_device_type(
void *data, bool wraparound)
2015-06-02 18:26:27 +00:00
{
2016-01-28 03:13:31 +00:00
retro_ctx_controller_info_t pad;
unsigned current_device, current_idx, i, devices[128],
types = 0, port = 0;
const struct retro_controller_info *desc = NULL;
2015-12-10 21:30:25 +00:00
rarch_setting_t *setting = (rarch_setting_t*)data;
settings_t *settings = config_get_ptr();
rarch_system_info_t *system = NULL;
2015-12-10 21:30:25 +00:00
2015-06-02 18:26:27 +00:00
if (!setting)
return -1;
2015-06-02 18:26:27 +00:00
port = setting->index_offset;
devices[types++] = RETRO_DEVICE_NONE;
devices[types++] = RETRO_DEVICE_JOYPAD;
2015-06-02 18:26:27 +00:00
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
if (system)
{
/* Only push RETRO_DEVICE_ANALOG as default if we use an
* older core which doesn't use SET_CONTROLLER_INFO. */
if (!system->ports.size)
devices[types++] = RETRO_DEVICE_ANALOG;
if (port < system->ports.size)
desc = &system->ports.data[port];
}
2015-06-02 18:26:27 +00:00
if (desc)
{
for (i = 0; i < desc->num_types; i++)
2015-06-02 18:26:27 +00:00
{
unsigned id = desc->types[i].id;
if (types < ARRAY_SIZE(devices) &&
id != RETRO_DEVICE_NONE &&
id != RETRO_DEVICE_JOYPAD)
devices[types++] = id;
2015-06-02 18:26:27 +00:00
}
}
current_device = settings->input.libretro_device[port];
current_idx = 0;
for (i = 0; i < types; i++)
{
if (current_device != devices[i])
continue;
2015-06-02 18:26:27 +00:00
current_idx = i;
break;
}
2015-06-02 18:26:27 +00:00
current_device = devices
[(current_idx + types - 1) % types];
2017-01-17 18:59:33 +00:00
input_config_set_device(port, current_device);
2016-01-28 03:13:31 +00:00
pad.port = port;
pad.device = current_device;
2016-05-07 23:33:57 +00:00
core_set_controller_port_device(&pad);
return 0;
2015-06-02 18:26:27 +00:00
}
static int setting_action_right_libretro_device_type(
void *data, bool wraparound)
2015-06-02 18:26:27 +00:00
{
2016-01-28 03:13:31 +00:00
retro_ctx_controller_info_t pad;
unsigned current_device, current_idx, i, devices[128],
types = 0, port = 0;
const struct retro_controller_info *desc = NULL;
2015-12-10 21:30:25 +00:00
rarch_setting_t *setting = (rarch_setting_t*)data;
settings_t *settings = config_get_ptr();
rarch_system_info_t *system = NULL;
2015-12-10 21:30:25 +00:00
if (!setting)
return -1;
2015-06-02 18:26:27 +00:00
port = setting->index_offset;
2015-06-02 18:26:27 +00:00
devices[types++] = RETRO_DEVICE_NONE;
devices[types++] = RETRO_DEVICE_JOYPAD;
if (runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system)
&& system)
2016-06-01 03:18:59 +00:00
{
/* Only push RETRO_DEVICE_ANALOG as default if we use an
2016-06-01 03:18:59 +00:00
* older core which doesn't use SET_CONTROLLER_INFO. */
if (!system->ports.size)
devices[types++] = RETRO_DEVICE_ANALOG;
2015-06-02 18:26:27 +00:00
2016-06-01 03:18:59 +00:00
if (port < system->ports.size)
desc = &system->ports.data[port];
}
2015-06-02 18:26:27 +00:00
if (desc)
2015-09-28 16:44:28 +00:00
{
for (i = 0; i < desc->num_types; i++)
{
unsigned id = desc->types[i].id;
if (types < ARRAY_SIZE(devices) &&
id != RETRO_DEVICE_NONE &&
id != RETRO_DEVICE_JOYPAD)
devices[types++] = id;
}
2015-09-28 16:44:28 +00:00
}
2015-06-02 18:26:27 +00:00
current_device = settings->input.libretro_device[port];
current_idx = 0;
for (i = 0; i < types; i++)
{
if (current_device != devices[i])
continue;
2015-06-02 18:26:27 +00:00
current_idx = i;
break;
}
2015-06-02 18:26:27 +00:00
current_device = devices
[(current_idx + 1) % types];
2015-06-02 18:26:27 +00:00
2017-01-17 18:59:33 +00:00
input_config_set_device(port, current_device);
2016-01-28 03:13:31 +00:00
pad.port = port;
pad.device = current_device;
2016-05-07 23:33:57 +00:00
core_set_controller_port_device(&pad);
2015-06-02 18:26:27 +00:00
return 0;
2015-06-02 18:26:27 +00:00
}
static int setting_action_left_bind_device(void *data, bool wraparound)
2015-06-02 18:26:27 +00:00
{
unsigned index_offset;
unsigned *p = NULL;
rarch_setting_t *setting = (rarch_setting_t*)data;
settings_t *settings = config_get_ptr();
2015-06-02 18:26:27 +00:00
if (!setting)
return -1;
2015-06-02 18:26:27 +00:00
index_offset = setting->index_offset;
2015-06-02 18:26:27 +00:00
p = &settings->input.joypad_map[index_offset];
2015-06-02 18:26:27 +00:00
if ((*p) >= settings->input.max_users)
*p = settings->input.max_users - 1;
else if ((*p) > 0)
(*p)--;
return 0;
2015-06-02 18:26:27 +00:00
}
static int setting_action_right_bind_device(void *data, bool wraparound)
2015-06-02 18:26:27 +00:00
{
unsigned index_offset;
unsigned *p = NULL;
rarch_setting_t *setting = (rarch_setting_t*)data;
settings_t *settings = config_get_ptr();
2015-06-02 18:26:27 +00:00
if (!setting)
return -1;
2015-06-02 18:26:27 +00:00
index_offset = setting->index_offset;
2015-06-02 18:26:27 +00:00
p = &settings->input.joypad_map[index_offset];
2015-06-02 18:26:27 +00:00
if (*p < settings->input.max_users)
(*p)++;
return 0;
2015-06-02 18:26:27 +00:00
}
2015-06-02 18:26:27 +00:00
/**
******* ACTION OK CALLBACK FUNCTIONS *******
**/
2015-06-02 18:26:27 +00:00
static int setting_action_ok_bind_all(void *data, bool wraparound)
{
(void)wraparound;
if (!menu_input_key_bind_set_mode(MENU_INPUT_BINDS_CTL_BIND_ALL, data))
return -1;
return 0;
2015-06-02 18:26:27 +00:00
}
static int setting_action_ok_bind_all_save_autoconfig(void *data, bool wraparound)
2015-06-02 18:26:27 +00:00
{
unsigned index_offset;
settings_t *settings = config_get_ptr();
rarch_setting_t *setting = (rarch_setting_t*)data;
const char *name = NULL;
2015-06-02 18:26:27 +00:00
(void)wraparound;
2015-06-02 18:26:27 +00:00
if (!settings || !setting)
return -1;
2015-06-02 18:26:27 +00:00
index_offset = setting->index_offset;
name = settings->input.device_names[index_offset];
2015-06-02 18:26:27 +00:00
if(!string_is_empty(name) && config_save_autoconf_profile(name, index_offset))
runloop_msg_queue_push(
2016-06-28 10:08:30 +00:00
msg_hash_to_str(MSG_AUTOCONFIG_FILE_SAVED_SUCCESSFULLY), 1, 100, true);
else
runloop_msg_queue_push(
2016-06-28 10:08:30 +00:00
msg_hash_to_str(MSG_AUTOCONFIG_FILE_ERROR_SAVING), 1, 100, true);
return 0;
2015-06-02 18:26:27 +00:00
}
static int setting_action_ok_bind_defaults(void *data, bool wraparound)
2015-06-02 18:26:27 +00:00
{
unsigned i;
2016-02-25 18:01:51 +00:00
menu_input_ctx_bind_limits_t lim;
2016-02-25 17:37:43 +00:00
struct retro_keybind *target = NULL;
const struct retro_keybind *def_binds = NULL;
2016-02-25 17:37:43 +00:00
rarch_setting_t *setting = (rarch_setting_t*)data;
settings_t *settings = config_get_ptr();
2015-06-02 18:26:27 +00:00
(void)wraparound;
2015-06-02 18:26:27 +00:00
if (!setting)
return -1;
2015-06-02 18:26:27 +00:00
2016-02-25 17:37:43 +00:00
target = (struct retro_keybind*)
&settings->input.binds[setting->index_offset][0];
def_binds = (setting->index_offset) ?
retro_keybinds_rest : retro_keybinds_1;
2015-06-02 18:26:27 +00:00
if (!target)
return -1;
2015-06-02 18:26:27 +00:00
2016-02-25 18:01:51 +00:00
lim.min = MENU_SETTINGS_BIND_BEGIN;
lim.max = MENU_SETTINGS_BIND_LAST;
2016-09-15 18:40:19 +00:00
menu_input_key_bind_set_min_max(&lim);
2015-06-02 18:26:27 +00:00
for (i = MENU_SETTINGS_BIND_BEGIN;
i <= MENU_SETTINGS_BIND_LAST; i++, target++)
{
2016-02-25 17:37:43 +00:00
target->key = def_binds[i - MENU_SETTINGS_BIND_BEGIN].key;
target->joykey = NO_BTN;
target->joyaxis = AXIS_NONE;
}
return 0;
2015-06-02 18:26:27 +00:00
}
2016-08-29 01:07:20 +00:00
static void setting_get_string_representation_st_float_video_refresh_rate_auto(void *data,
char *s, size_t len)
{
double video_refresh_rate = 0.0;
double deviation = 0.0;
unsigned sample_points = 0;
rarch_setting_t *setting = (rarch_setting_t*)data;
if (!setting)
return;
if (video_monitor_fps_statistics(&video_refresh_rate, &deviation, &sample_points))
{
snprintf(s, len, "%.3f Hz (%.1f%% dev, %u samples)",
video_refresh_rate, 100.0 * deviation, sample_points);
menu_animation_ctl(MENU_ANIMATION_CTL_SET_ACTIVE, NULL);
}
else
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), len);
}
static int setting_action_ok_video_refresh_rate_auto(void *data, bool wraparound)
2015-06-02 18:26:27 +00:00
{
double video_refresh_rate = 0.0;
double deviation = 0.0;
unsigned sample_points = 0;
rarch_setting_t *setting = (rarch_setting_t*)data;
2015-06-02 18:26:27 +00:00
if (!setting)
return -1;
2015-06-02 18:26:27 +00:00
if (video_monitor_fps_statistics(&video_refresh_rate,
&deviation, &sample_points))
{
2015-12-13 20:28:06 +00:00
float video_refresh_rate_float = (float)video_refresh_rate;
driver_ctl(RARCH_DRIVER_CTL_SET_REFRESH_RATE, &video_refresh_rate_float);
/* Incase refresh rate update forced non-block video. */
2016-05-09 18:51:53 +00:00
command_event(CMD_EVENT_VIDEO_SET_BLOCKING_STATE, NULL);
}
2015-06-02 18:26:27 +00:00
if (setting_generic_action_ok_default(setting, wraparound) != 0)
return -1;
return 0;
2015-06-02 18:26:27 +00:00
}
static void get_string_representation_bind_device(void * data, char *s,
size_t len)
{
unsigned index_offset, map = 0;
2015-06-02 18:26:27 +00:00
rarch_setting_t *setting = (rarch_setting_t*)data;
settings_t *settings = config_get_ptr();
if (!setting)
return;
index_offset = setting->index_offset;
map = settings->input.joypad_map[index_offset];
2015-06-02 18:26:27 +00:00
if (map < settings->input.max_users)
{
const char *device_name = settings->input.device_names[map];
2016-10-26 03:46:16 +00:00
if (!string_is_empty(device_name))
snprintf(s, len,
"%s (#%u)",
device_name,
settings->input.device_name_index[map]);
2015-06-02 18:26:27 +00:00
else
snprintf(s, len,
2015-06-25 05:23:19 +00:00
"%s (%s #%u)",
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE),
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PORT),
2015-06-25 05:23:19 +00:00
map);
2015-06-02 18:26:27 +00:00
}
else
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISABLED), len);
2015-06-02 18:26:27 +00:00
}
/**
* menu_setting_get_label:
2015-06-02 18:26:27 +00:00
* @list : File list on which to perform the search
* @s : String for the type to be represented on-screen as
* a label.
* @len : Size of @s
* @w : Width of the string (for text label representation
* purposes in the menu display driver).
* @type : Identifier of setting.
* @menu_label : Menu Label identifier of setting.
* @label : Label identifier of setting.
* @idx : Index identifier of setting.
*
* Get associated label of a setting.
**/
void menu_setting_get_label(void *data, char *s,
size_t len, unsigned *w, unsigned type,
2015-06-02 18:26:27 +00:00
const char *menu_label, const char *label, unsigned idx)
{
2015-10-11 13:46:55 +00:00
rarch_setting_t *setting = NULL;
file_list_t *list = (file_list_t*)data;
if (!list || !label)
2015-06-02 18:26:27 +00:00
return;
2015-06-06 17:31:39 +00:00
setting = menu_setting_find(list->list[idx].label);
2015-06-02 18:26:27 +00:00
if (setting && setting->get_string_representation)
setting->get_string_representation(setting, s, len);
2015-06-02 18:26:27 +00:00
}
void general_read_handler(void *data)
2015-06-02 18:26:27 +00:00
{
rarch_setting_t *setting = (rarch_setting_t*)data;
settings_t *settings = config_get_ptr();
if (!setting)
return;
if (setting->enum_idx != MSG_UNKNOWN)
2015-06-02 18:26:27 +00:00
{
2016-06-16 12:35:53 +00:00
switch (setting->enum_idx)
{
case MENU_ENUM_LABEL_AUDIO_RATE_CONTROL_DELTA:
*setting->value.target.fraction = settings->audio.rate_control_delta;
if (*setting->value.target.fraction < 0.0005)
{
2016-10-26 03:46:16 +00:00
settings->audio.rate_control = false;
2016-06-16 12:35:53 +00:00
settings->audio.rate_control_delta = 0.0;
}
else
{
2016-10-26 03:46:16 +00:00
settings->audio.rate_control = true;
2016-06-16 12:35:53 +00:00
settings->audio.rate_control_delta = *setting->value.target.fraction;
}
break;
case MENU_ENUM_LABEL_AUDIO_MAX_TIMING_SKEW:
*setting->value.target.fraction = settings->audio.max_timing_skew;
break;
case MENU_ENUM_LABEL_VIDEO_REFRESH_RATE_AUTO:
*setting->value.target.fraction = settings->video.refresh_rate;
break;
case MENU_ENUM_LABEL_INPUT_PLAYER1_JOYPAD_INDEX:
*setting->value.target.integer = settings->input.joypad_map[0];
break;
case MENU_ENUM_LABEL_INPUT_PLAYER2_JOYPAD_INDEX:
*setting->value.target.integer = settings->input.joypad_map[1];
break;
case MENU_ENUM_LABEL_INPUT_PLAYER3_JOYPAD_INDEX:
*setting->value.target.integer = settings->input.joypad_map[2];
break;
case MENU_ENUM_LABEL_INPUT_PLAYER4_JOYPAD_INDEX:
*setting->value.target.integer = settings->input.joypad_map[3];
break;
case MENU_ENUM_LABEL_INPUT_PLAYER5_JOYPAD_INDEX:
*setting->value.target.integer = settings->input.joypad_map[4];
break;
default:
break;
}
2015-06-02 18:26:27 +00:00
}
}
void general_write_handler(void *data)
2015-06-02 18:26:27 +00:00
{
2016-05-09 18:51:53 +00:00
enum event_command rarch_cmd = CMD_EVENT_NONE;
2015-09-28 00:10:44 +00:00
rarch_setting_t *setting = (rarch_setting_t*)data;
settings_t *settings = config_get_ptr();
2015-12-10 21:30:25 +00:00
2015-06-02 18:26:27 +00:00
if (!setting)
return;
2016-05-09 18:51:53 +00:00
if (setting->cmd_trigger.idx != CMD_EVENT_NONE)
2015-06-02 18:26:27 +00:00
{
uint64_t flags = setting->flags;
2015-09-28 00:10:44 +00:00
if (flags & SD_FLAG_EXIT)
2015-06-02 18:26:27 +00:00
{
2016-03-18 18:01:42 +00:00
if (*setting->value.target.boolean)
*setting->value.target.boolean = false;
2015-06-02 18:26:27 +00:00
}
if (setting->cmd_trigger.triggered ||
2015-09-28 00:10:44 +00:00
(flags & SD_FLAG_CMD_APPLY_AUTO))
2015-06-02 18:26:27 +00:00
rarch_cmd = setting->cmd_trigger.idx;
}
switch (setting->enum_idx)
2015-06-02 18:26:27 +00:00
{
case MENU_ENUM_LABEL_VIDEO_THREADED:
{
2016-03-18 18:01:42 +00:00
if (*setting->value.target.boolean)
task_queue_set_threaded();
else
task_queue_unset_threaded();
}
break;
case MENU_ENUM_LABEL_INPUT_POLL_TYPE_BEHAVIOR:
2016-05-07 23:33:57 +00:00
core_set_poll_type((unsigned int*)setting->value.target.integer);
break;
case MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER:
2015-09-27 17:14:56 +00:00
{
video_viewport_t vp;
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
video_viewport_t *custom = video_viewport_get_custom();
struct retro_game_geometry *geom = (struct retro_game_geometry*)
&av_info->geometry;
2016-05-08 12:00:51 +00:00
video_driver_get_viewport_info(&vp);
2015-09-27 17:14:56 +00:00
2016-03-18 18:01:42 +00:00
if (*setting->value.target.boolean)
2015-09-27 17:14:56 +00:00
{
custom->x = 0;
custom->y = 0;
custom->width = ((custom->width + geom->base_width - 1) / geom->base_width) * geom->base_width;
custom->height = ((custom->height + geom->base_height - 1) / geom->base_height) * geom->base_height;
aspectratio_lut[ASPECT_RATIO_CUSTOM].value =
(float)custom->width / custom->height;
2015-09-27 17:14:56 +00:00
}
}
break;
case MENU_ENUM_LABEL_HELP:
2016-03-18 18:01:42 +00:00
if (*setting->value.target.boolean)
2015-06-05 13:14:26 +00:00
{
2016-10-15 23:45:50 +00:00
menu_displaylist_info_t info = {0};
2016-12-23 01:01:09 +00:00
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
2016-12-19 17:40:00 +00:00
2015-10-17 15:58:59 +00:00
info.list = menu_stack;
info.type = 0;
2015-06-05 13:14:26 +00:00
info.directory_ptr = 0;
2015-06-19 05:23:58 +00:00
strlcpy(info.label,
msg_hash_to_str(MENU_ENUM_LABEL_HELP), sizeof(info.label));
2016-06-17 21:47:23 +00:00
info.enum_idx = MENU_ENUM_LABEL_HELP;
2015-06-02 18:26:27 +00:00
2016-02-24 22:05:54 +00:00
if (menu_displaylist_ctl(DISPLAYLIST_GENERIC, &info))
2016-02-24 22:19:53 +00:00
menu_displaylist_ctl(DISPLAYLIST_PROCESS, &info);
2016-08-29 01:07:20 +00:00
setting_set_with_string_representation(setting, "false");
2015-06-05 13:14:26 +00:00
}
break;
case MENU_ENUM_LABEL_AUDIO_MAX_TIMING_SKEW:
2016-03-18 18:01:42 +00:00
settings->audio.max_timing_skew = *setting->value.target.fraction;
2015-06-05 13:14:26 +00:00
break;
case MENU_ENUM_LABEL_AUDIO_RATE_CONTROL_DELTA:
2016-03-18 18:01:42 +00:00
if (*setting->value.target.fraction < 0.0005)
2015-06-05 13:14:26 +00:00
{
settings->audio.rate_control = false;
settings->audio.rate_control_delta = 0.0;
}
else
{
settings->audio.rate_control = true;
2016-03-18 18:01:42 +00:00
settings->audio.rate_control_delta = *setting->value.target.fraction;
2015-06-05 13:14:26 +00:00
}
break;
case MENU_ENUM_LABEL_VIDEO_REFRESH_RATE_AUTO:
2016-03-18 18:01:42 +00:00
driver_ctl(RARCH_DRIVER_CTL_SET_REFRESH_RATE, setting->value.target.fraction);
2015-06-02 18:26:27 +00:00
2015-11-23 13:14:12 +00:00
/* In case refresh rate update forced non-block video. */
2016-05-09 18:51:53 +00:00
rarch_cmd = CMD_EVENT_VIDEO_SET_BLOCKING_STATE;
2015-06-05 13:14:26 +00:00
break;
case MENU_ENUM_LABEL_VIDEO_SCALE:
2016-03-18 18:01:42 +00:00
settings->video.scale = roundf(*setting->value.target.fraction);
2015-06-05 13:14:26 +00:00
if (!settings->video.fullscreen)
2016-05-09 18:51:53 +00:00
rarch_cmd = CMD_EVENT_REINIT;
2015-06-05 13:14:26 +00:00
break;
case MENU_ENUM_LABEL_INPUT_PLAYER1_JOYPAD_INDEX:
2016-03-18 18:01:42 +00:00
settings->input.joypad_map[0] = *setting->value.target.integer;
2015-06-05 13:14:26 +00:00
break;
case MENU_ENUM_LABEL_INPUT_PLAYER2_JOYPAD_INDEX:
2016-03-18 18:01:42 +00:00
settings->input.joypad_map[1] = *setting->value.target.integer;
2015-06-05 13:14:26 +00:00
break;
case MENU_ENUM_LABEL_INPUT_PLAYER3_JOYPAD_INDEX:
2016-03-18 18:01:42 +00:00
settings->input.joypad_map[2] = *setting->value.target.integer;
2015-06-05 13:14:26 +00:00
break;
case MENU_ENUM_LABEL_INPUT_PLAYER4_JOYPAD_INDEX:
2016-03-18 18:01:42 +00:00
settings->input.joypad_map[3] = *setting->value.target.integer;
2015-06-05 13:14:26 +00:00
break;
case MENU_ENUM_LABEL_INPUT_PLAYER5_JOYPAD_INDEX:
2016-03-18 18:01:42 +00:00
settings->input.joypad_map[4] = *setting->value.target.integer;
2015-06-05 13:14:26 +00:00
break;
case MENU_ENUM_LABEL_LOG_VERBOSITY:
{
if (setting
&& setting->value.target.boolean
&& *setting->value.target.boolean)
2016-05-31 02:42:04 +00:00
verbosity_enable();
else
verbosity_disable();
if (setting
&& setting->value.target.boolean
&& *setting->value.target.boolean)
2016-10-01 03:51:03 +00:00
retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_VERBOSITY, NULL);
else
retroarch_override_setting_unset(RARCH_OVERRIDE_SETTING_VERBOSITY, NULL);
}
2015-06-05 13:14:26 +00:00
break;
case MENU_ENUM_LABEL_VIDEO_SMOOTH:
2015-06-05 13:14:26 +00:00
video_driver_set_filtering(1, settings->video.smooth);
break;
case MENU_ENUM_LABEL_VIDEO_ROTATION:
{
rarch_system_info_t *system = NULL;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
if (system)
video_driver_set_rotation(
(*setting->value.target.unsigned_integer +
system->rotation) % 4);
}
2015-06-05 13:14:26 +00:00
break;
case MENU_ENUM_LABEL_AUDIO_VOLUME:
2016-03-18 18:01:42 +00:00
audio_driver_set_volume_gain(db_to_gain(*setting->value.target.fraction));
2015-06-05 13:14:26 +00:00
break;
case MENU_ENUM_LABEL_AUDIO_LATENCY:
2016-05-09 18:51:53 +00:00
rarch_cmd = CMD_EVENT_AUDIO_REINIT;
2015-06-05 13:14:26 +00:00
break;
case MENU_ENUM_LABEL_PAL60_ENABLE:
2016-12-23 01:01:09 +00:00
{
global_t *global = global_get_ptr();
if (*setting->value.target.boolean && global->console.screen.pal_enable)
rarch_cmd = CMD_EVENT_REINIT;
else
setting_set_with_string_representation(setting, "false");
}
2015-06-05 13:14:26 +00:00
break;
case MENU_ENUM_LABEL_SYSTEM_BGM_ENABLE:
2016-03-18 18:01:42 +00:00
if (*setting->value.target.boolean)
2015-06-05 13:14:26 +00:00
{
2015-06-02 18:26:27 +00:00
#if defined(__CELLOS_LV2__) && (CELL_SDK_VERSION > 0x340000)
2015-06-05 13:14:26 +00:00
cellSysutilEnableBgmPlayback();
#endif
2015-06-05 13:14:26 +00:00
}
else
{
2015-06-02 18:26:27 +00:00
#if defined(__CELLOS_LV2__) && (CELL_SDK_VERSION > 0x340000)
2015-06-05 13:14:26 +00:00
cellSysutilDisableBgmPlayback();
2015-06-02 18:26:27 +00:00
#endif
2015-06-05 13:14:26 +00:00
}
break;
case MENU_ENUM_LABEL_NETPLAY_IP_ADDRESS:
2016-09-29 19:07:10 +00:00
#ifdef HAVE_NETWORKING
2016-08-01 19:51:23 +00:00
{
bool val = (!string_is_empty(setting->value.target.string));
if (val)
2016-10-01 03:51:03 +00:00
retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS, NULL);
2016-08-01 19:51:23 +00:00
else
retroarch_override_setting_unset(RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS, NULL);
2016-08-01 19:51:23 +00:00
}
2015-06-02 18:26:27 +00:00
#endif
2015-06-05 13:14:26 +00:00
break;
case MENU_ENUM_LABEL_NETPLAY_MODE:
2016-09-29 19:07:10 +00:00
#ifdef HAVE_NETWORKING
2016-10-01 06:24:02 +00:00
retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_NETPLAY_MODE, NULL);
2015-06-05 13:14:26 +00:00
#endif
break;
case MENU_ENUM_LABEL_NETPLAY_STATELESS_MODE:
2016-09-29 19:07:10 +00:00
#ifdef HAVE_NETWORKING
retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_NETPLAY_STATELESS_MODE, NULL);
2015-06-05 13:14:26 +00:00
#endif
break;
case MENU_ENUM_LABEL_NETPLAY_CHECK_FRAMES:
2016-09-29 19:07:10 +00:00
#ifdef HAVE_NETWORKING
retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_NETPLAY_CHECK_FRAMES, NULL);
#endif
break;
default:
break;
2015-06-02 18:26:27 +00:00
}
if (rarch_cmd || setting->cmd_trigger.triggered)
2016-05-09 18:20:50 +00:00
command_event(rarch_cmd, NULL);
2015-06-02 18:26:27 +00:00
}
#ifdef HAVE_OVERLAY
2015-06-02 18:26:27 +00:00
static void overlay_enable_toggle_change_handler(void *data)
{
2015-07-09 02:05:59 +00:00
settings_t *settings = config_get_ptr();
2015-06-02 18:26:27 +00:00
rarch_setting_t *setting = (rarch_setting_t *)data;
if (!setting)
return;
2015-07-09 02:05:59 +00:00
if (settings && settings->input.overlay_hide_in_menu)
{
2016-05-09 18:51:53 +00:00
command_event(CMD_EVENT_OVERLAY_DEINIT, NULL);
2015-07-09 02:05:59 +00:00
return;
}
2016-03-18 18:01:42 +00:00
if (setting->value.target.boolean)
2016-05-09 18:51:53 +00:00
command_event(CMD_EVENT_OVERLAY_INIT, NULL);
2015-06-02 18:26:27 +00:00
else
2016-05-09 18:51:53 +00:00
command_event(CMD_EVENT_OVERLAY_DEINIT, NULL);
2015-06-02 18:26:27 +00:00
}
#endif
2015-06-02 18:26:27 +00:00
#ifdef HAVE_LAKKA
2016-04-25 13:21:39 +00:00
static void systemd_service_toggle(const char *path, char *unit, bool enable)
2016-03-23 18:20:26 +00:00
{
int pid = fork();
2016-04-27 09:11:53 +00:00
char* args[] = {(char*)"systemctl", NULL, NULL, NULL};
2016-04-27 09:11:53 +00:00
if (enable)
args[1] = (char*)"start";
else
args[1] = (char*)"stop";
args[2] = unit;
2016-03-23 18:20:26 +00:00
if (enable)
fclose(fopen(path, "w"));
else
2016-03-23 18:20:26 +00:00
remove(path);
2016-04-27 09:11:53 +00:00
if (pid == 0)
execvp(args[0], args);
2016-03-23 18:20:26 +00:00
return;
}
2016-03-23 18:20:26 +00:00
static void ssh_enable_toggle_change_handler(void *data)
{
2016-04-27 09:11:53 +00:00
bool enable = false;
2016-03-23 18:20:26 +00:00
settings_t *settings = config_get_ptr();
2016-04-27 09:11:53 +00:00
if (settings && settings->ssh_enable)
enable = true;
systemd_service_toggle(LAKKA_SSH_PATH, (char*)"sshd.service",
enable);
}
2016-04-27 09:11:53 +00:00
static void samba_enable_toggle_change_handler(void *data)
{
2016-04-27 09:11:53 +00:00
bool enable = false;
settings_t *settings = config_get_ptr();
if (settings && settings->samba_enable)
2016-04-27 09:11:53 +00:00
enable = true;
systemd_service_toggle(LAKKA_SAMBA_PATH, (char*)"smbd.service",
enable);
}
2016-04-27 09:11:53 +00:00
2016-03-23 13:06:53 +00:00
static void bluetooth_enable_toggle_change_handler(void *data)
{
2016-04-27 09:11:53 +00:00
bool enable = false;
2016-03-23 13:06:53 +00:00
settings_t *settings = config_get_ptr();
if (settings && settings->bluetooth_enable)
2016-04-27 09:11:53 +00:00
enable = true;
systemd_service_toggle(LAKKA_BLUETOOTH_PATH, (char*)"bluetooth.service",
enable);
2016-03-23 13:06:53 +00:00
}
#endif
2016-03-20 19:45:06 +00:00
enum settings_list_type
{
SETTINGS_LIST_NONE = 0,
SETTINGS_LIST_MAIN_MENU,
SETTINGS_LIST_DRIVERS,
SETTINGS_LIST_CORE,
SETTINGS_LIST_CONFIGURATION,
SETTINGS_LIST_LOGGING,
SETTINGS_LIST_SAVING,
SETTINGS_LIST_REWIND,
SETTINGS_LIST_VIDEO,
SETTINGS_LIST_AUDIO,
SETTINGS_LIST_INPUT,
SETTINGS_LIST_INPUT_HOTKEY,
SETTINGS_LIST_RECORDING,
SETTINGS_LIST_FRAME_THROTTLING,
SETTINGS_LIST_FONT,
SETTINGS_LIST_OVERLAY,
SETTINGS_LIST_MENU,
SETTINGS_LIST_MENU_FILE_BROWSER,
SETTINGS_LIST_MULTIMEDIA,
SETTINGS_LIST_USER_INTERFACE,
SETTINGS_LIST_PLAYLIST,
SETTINGS_LIST_CHEEVOS,
SETTINGS_LIST_CORE_UPDATER,
SETTINGS_LIST_NETPLAY,
SETTINGS_LIST_LAKKA_SERVICES,
2016-03-20 19:45:06 +00:00
SETTINGS_LIST_USER,
SETTINGS_LIST_USER_ACCOUNTS,
SETTINGS_LIST_USER_ACCOUNTS_CHEEVOS,
SETTINGS_LIST_DIRECTORY,
SETTINGS_LIST_PRIVACY
};
static bool setting_append_list_input_player_options(
rarch_setting_t **list,
rarch_setting_info_t *list_info,
const char *parent_group,
unsigned user)
{
/* This constants matches the string length.
* Keep it up to date or you'll get some really obvious bugs.
* 2 is the length of '99'; we don't need more users than that.
*/
static char buffer[MAX_USERS][13+2+1];
2016-10-27 07:49:21 +00:00
static char group_lbl[MAX_USERS][255];
unsigned i;
2016-12-19 17:40:00 +00:00
rarch_setting_group_info_t group_info = {0};
rarch_setting_group_info_t subgroup_info = {0};
settings_t *settings = config_get_ptr();
rarch_system_info_t *system = NULL;
const char *temp_value = NULL;
const struct retro_keybind* const defaults =
(user == 0) ? retro_keybinds_1 : retro_keybinds_rest;
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
temp_value =msg_hash_to_str((enum msg_hash_enums)(MENU_ENUM_LABEL_INPUT_USER_1_BINDS + user));
2016-06-17 20:12:06 +00:00
snprintf(buffer[user], sizeof(buffer[user]),
"%s %u", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER), user + 1);
2016-06-17 20:12:06 +00:00
strlcpy(group_lbl[user], temp_value, sizeof(group_lbl[user]));
START_GROUP(list, list_info, &group_info, group_lbl[user], parent_group);
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS);
START_SUB_GROUP(
list,
list_info,
buffer[user],
&group_info,
&subgroup_info,
parent_group);
{
2016-12-19 17:30:17 +00:00
char tmp_string[PATH_MAX_LENGTH];
/* These constants match the string lengths.
* Keep them up to date or you'll get some really obvious bugs.
* 2 is the length of '99'; we don't need more users than that.
*/
/* FIXME/TODO - really need to clean up this mess in some way. */
static char key[MAX_USERS][64];
static char key_type[MAX_USERS][64];
static char key_analog[MAX_USERS][64];
static char key_bind_all[MAX_USERS][64];
static char key_bind_all_save_autoconfig[MAX_USERS][64];
static char key_bind_defaults[MAX_USERS][64];
static char label[MAX_USERS][64];
static char label_type[MAX_USERS][64];
static char label_analog[MAX_USERS][64];
static char label_bind_all[MAX_USERS][64];
static char label_bind_all_save_autoconfig[MAX_USERS][64];
static char label_bind_defaults[MAX_USERS][64];
2016-12-19 17:30:17 +00:00
tmp_string[0] = '\0';
2016-07-23 02:30:35 +00:00
snprintf(tmp_string, sizeof(tmp_string), "input_player%u", user + 1);
fill_pathname_join_delim(key[user], tmp_string, "joypad_index", '_',
sizeof(key[user]));
snprintf(key_type[user], sizeof(key_type[user]),
2016-07-10 12:59:59 +00:00
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_LIBRETRO_DEVICE),
user + 1);
snprintf(key_analog[user], sizeof(key_analog[user]),
2016-07-10 12:59:59 +00:00
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_PLAYER_ANALOG_DPAD_MODE),
user + 1);
2016-07-23 02:30:35 +00:00
fill_pathname_join_delim(key_bind_all[user], tmp_string, "bind_all", '_',
sizeof(key_bind_all[user]));
fill_pathname_join_delim(key_bind_all_save_autoconfig[user],
tmp_string, "bind_all_save_autoconfig", '_',
sizeof(key_bind_all_save_autoconfig[user]));
fill_pathname_join_delim(key_bind_defaults[user],
tmp_string, "bind_defaults", '_',
sizeof(key_bind_defaults[user]));
snprintf(label[user], sizeof(label[user]),
"%s %u %s", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER), user + 1,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_DEVICE_INDEX));
snprintf(label_type[user], sizeof(label_type[user]),
"%s %u %s", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER), user + 1,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_DEVICE_TYPE));
snprintf(label_analog[user], sizeof(label_analog[user]),
"%s %u %s", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER), user + 1,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_ADC_TYPE));
snprintf(label_bind_all[user], sizeof(label_bind_all[user]),
"%s %u %s", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER), user + 1,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL));
snprintf(label_bind_defaults[user], sizeof(label_bind_defaults[user]),
"%s %u %s", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER), user + 1,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL));
snprintf(label_bind_all_save_autoconfig[user], sizeof(label_bind_all_save_autoconfig[user]),
"%s %u %s", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER), user + 1,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG));
2016-10-26 03:38:25 +00:00
CONFIG_UINT_ALT(
list, list_info,
&settings->input.libretro_device[user],
key_type[user],
label_type[user],
user,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
(*list)[list_info->index - 1].index = user + 1;
(*list)[list_info->index - 1].index_offset = user;
(*list)[list_info->index - 1].action_left = &setting_action_left_libretro_device_type;
(*list)[list_info->index - 1].action_right = &setting_action_right_libretro_device_type;
(*list)[list_info->index - 1].action_select = &setting_action_right_libretro_device_type;
(*list)[list_info->index - 1].action_start = &setting_action_start_libretro_device_type;
(*list)[list_info->index - 1].get_string_representation =
&setting_get_string_representation_uint_libretro_device;
2016-07-21 19:37:52 +00:00
menu_settings_list_current_add_enum_idx(list, list_info, (enum msg_hash_enums)(MENU_ENUM_LABEL_INPUT_LIBRETRO_DEVICE + user));
2016-10-26 03:38:25 +00:00
CONFIG_UINT_ALT(
list, list_info,
&settings->input.analog_dpad_mode[user],
key_analog[user],
label_analog[user],
user,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
(*list)[list_info->index - 1].index = user + 1;
(*list)[list_info->index - 1].index_offset = user;
(*list)[list_info->index - 1].action_left = &setting_action_left_analog_dpad_mode;
(*list)[list_info->index - 1].action_right = &setting_action_right_analog_dpad_mode;
(*list)[list_info->index - 1].action_select = &setting_action_right_analog_dpad_mode;
(*list)[list_info->index - 1].action_start = &setting_action_start_analog_dpad_mode;
(*list)[list_info->index - 1].get_string_representation =
&setting_get_string_representation_uint_analog_dpad_mode;
2016-07-21 19:37:52 +00:00
menu_settings_list_current_add_enum_idx(list, list_info, (enum msg_hash_enums)(MENU_ENUM_LABEL_INPUT_PLAYER_ANALOG_DPAD_MODE + user));
2016-10-26 03:15:52 +00:00
CONFIG_ACTION_ALT(
list, list_info,
key[user],
label[user],
&group_info,
&subgroup_info,
parent_group);
(*list)[list_info->index - 1].index = user + 1;
(*list)[list_info->index - 1].index_offset = user;
(*list)[list_info->index - 1].action_start = &setting_action_start_bind_device;
(*list)[list_info->index - 1].action_left = &setting_action_left_bind_device;
(*list)[list_info->index - 1].action_right = &setting_action_right_bind_device;
(*list)[list_info->index - 1].action_select = &setting_action_right_bind_device;
(*list)[list_info->index - 1].get_string_representation = &get_string_representation_bind_device;
2016-10-26 03:15:52 +00:00
CONFIG_ACTION_ALT(
list, list_info,
key_bind_all[user],
label_bind_all[user],
&group_info,
&subgroup_info,
parent_group);
(*list)[list_info->index - 1].index = user + 1;
(*list)[list_info->index - 1].index_offset = user;
(*list)[list_info->index - 1].action_ok = &setting_action_ok_bind_all;
(*list)[list_info->index - 1].action_cancel = NULL;
2016-10-26 03:15:52 +00:00
CONFIG_ACTION_ALT(
list, list_info,
key_bind_defaults[user],
label_bind_defaults[user],
&group_info,
&subgroup_info,
parent_group);
(*list)[list_info->index - 1].index = user + 1;
(*list)[list_info->index - 1].index_offset = user;
(*list)[list_info->index - 1].action_ok = &setting_action_ok_bind_defaults;
(*list)[list_info->index - 1].action_cancel = NULL;
2016-10-26 03:15:52 +00:00
CONFIG_ACTION_ALT(
list, list_info,
key_bind_all_save_autoconfig[user],
label_bind_all_save_autoconfig[user],
&group_info,
&subgroup_info,
parent_group);
(*list)[list_info->index - 1].index = user + 1;
(*list)[list_info->index - 1].index_offset = user;
(*list)[list_info->index - 1].action_ok = &setting_action_ok_bind_all_save_autoconfig;
(*list)[list_info->index - 1].action_cancel = NULL;
}
for (i = 0; i < RARCH_BIND_LIST_END; i ++)
{
2016-10-27 07:49:21 +00:00
char label[255];
char name[255];
if (input_config_bind_map_get_meta(i))
continue;
2016-10-26 04:23:05 +00:00
label[0] = name[0] = '\0';
2016-06-29 16:14:29 +00:00
fill_pathname_noext(label, buffer[user],
" ",
sizeof(label));
2016-07-10 13:04:01 +00:00
if (
settings->input.input_descriptor_label_show
&& (i < RARCH_FIRST_META_KEY)
2016-05-07 23:33:57 +00:00
&& core_has_set_input_descriptor()
&& (i != RARCH_TURBO_ENABLE)
)
{
if (system->input_desc_btn[user][i])
strlcat(label,
system->input_desc_btn[user][i],
sizeof(label));
else
{
strlcat(label, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE),
sizeof(label));
if (settings->input.input_descriptor_hide_unbound)
2016-07-10 13:04:01 +00:00
continue;
}
}
else
strlcat(label, input_config_bind_map_get_desc(i), sizeof(label));
snprintf(name, sizeof(name), "p%u_%s", user + 1, input_config_bind_map_get_base(i));
2016-10-27 02:03:24 +00:00
CONFIG_BIND_ALT(
2016-07-10 13:04:01 +00:00
list, list_info,
&settings->input.binds[user][i],
user + 1,
user,
strdup(name),
strdup(label),
&defaults[i],
&group_info,
&subgroup_info,
parent_group);
(*list)[list_info->index - 1].bind_type = i + MENU_SETTINGS_BIND_BEGIN;
}
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
return true;
}
2016-12-12 11:29:37 +00:00
/**
* config_get_audio_resampler_driver_options:
*
* Get an enumerated list of all resampler driver names, separated by '|'.
*
* Returns: string listing of all resampler driver names, separated by '|'.
**/
static const char* config_get_audio_resampler_driver_options(void)
{
return char_list_new_special(STRING_LIST_AUDIO_RESAMPLER_DRIVERS, NULL);
}
2016-03-20 18:54:16 +00:00
static bool setting_append_list(
enum settings_list_type type,
2015-06-02 18:26:27 +00:00
rarch_setting_t **list,
2015-06-07 23:40:25 +00:00
rarch_setting_info_t *list_info,
const char *parent_group)
2015-06-02 18:26:27 +00:00
{
unsigned user;
2015-06-06 08:35:14 +00:00
rarch_setting_group_info_t group_info = {0};
rarch_setting_group_info_t subgroup_info = {0};
2016-12-19 17:40:00 +00:00
settings_t *settings = config_get_ptr();
global_t *global = global_get_ptr();
2015-06-02 18:26:27 +00:00
(void)settings;
2016-03-20 19:45:06 +00:00
(void)global;
2016-03-20 18:54:16 +00:00
switch (type)
{
case SETTINGS_LIST_MAIN_MENU:
START_GROUP(list, list_info, &group_info, msg_hash_to_str(MENU_ENUM_LABEL_MAIN_MENU), parent_group);
2016-06-17 00:46:17 +00:00
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_MAIN_MENU);
2016-03-20 18:54:16 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
2015-06-15 04:15:02 +00:00
2016-03-20 18:54:16 +00:00
CONFIG_INT(
list, list_info,
&settings->state_slot,
2016-10-26 03:32:28 +00:00
MENU_ENUM_LABEL_STATE_SLOT,
MENU_ENUM_LABEL_VALUE_STATE_SLOT,
2016-03-20 18:54:16 +00:00
0,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, -1, 0, 1, true, false);
2016-03-20 18:54:16 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_START_CORE,
MENU_ENUM_LABEL_VALUE_START_CORE,
2016-03-20 18:54:16 +00:00
&group_info,
&subgroup_info,
parent_group);
2016-01-24 00:51:05 +00:00
2016-07-28 18:35:05 +00:00
#if defined(HAVE_VIDEO_PROCESSOR)
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_START_VIDEO_PROCESSOR,
MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR,
2016-07-28 18:35:05 +00:00
&group_info,
&subgroup_info,
parent_group);
#endif
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORKGAMEPAD) && defined(HAVE_NETWORKGAMEPAD_CORE)
2016-05-27 17:18:46 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_START_NET_RETROPAD,
MENU_ENUM_LABEL_VALUE_START_NET_RETROPAD,
2016-05-27 17:18:46 +00:00
&group_info,
&subgroup_info,
parent_group);
#endif
2016-03-20 18:54:16 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_CONTENT_SETTINGS,
MENU_ENUM_LABEL_VALUE_CONTENT_SETTINGS,
2016-03-20 18:54:16 +00:00
&group_info,
&subgroup_info,
parent_group);
2015-07-18 20:11:59 +00:00
2016-02-04 10:31:34 +00:00
#ifndef HAVE_DYNAMIC
2016-03-20 18:54:16 +00:00
if (frontend_driver_has_fork())
2015-06-02 18:26:27 +00:00
#endif
2016-03-20 18:54:16 +00:00
{
2016-10-27 07:49:21 +00:00
char ext_name[255];
2016-10-26 04:23:05 +00:00
ext_name[0] = '\0';
2016-03-20 18:54:16 +00:00
if (frontend_driver_get_core_extension(ext_name, sizeof(ext_name)))
{
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_CORE_LIST,
MENU_ENUM_LABEL_VALUE_CORE_LIST,
2016-03-20 18:54:16 +00:00
&group_info,
&subgroup_info,
parent_group);
2016-10-03 14:16:55 +00:00
(*list)[list_info->index - 1].size = path_get_realsize(RARCH_PATH_CORE);
2016-10-03 13:46:07 +00:00
(*list)[list_info->index - 1].value.target.string = path_get_ptr(RARCH_PATH_CORE);
2016-03-20 18:54:16 +00:00
(*list)[list_info->index - 1].values = ext_name;
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_LOAD_CORE);
2016-03-20 18:54:16 +00:00
settings_data_list_current_add_flags(list, list_info, SD_FLAG_BROWSER_ACTION);
}
}
2016-02-03 13:36:34 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_LOAD_CONTENT_LIST,
MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST,
2016-02-03 13:36:34 +00:00
&group_info,
&subgroup_info,
parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 18:54:16 +00:00
if (settings->history_list_enable)
{
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY,
MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_HISTORY,
2016-03-20 18:54:16 +00:00
&group_info,
&subgroup_info,
parent_group);
}
if (!string_is_equal(settings->menu.driver, "xmb"))
{
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_ADD_CONTENT_LIST,
MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST,
&group_info,
&subgroup_info,
parent_group);
}
2015-07-03 23:51:41 +00:00
2016-09-29 19:07:10 +00:00
#if defined(HAVE_NETWORKING)
2016-03-20 18:54:16 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_NETPLAY,
MENU_ENUM_LABEL_VALUE_NETPLAY,
2016-03-20 18:54:16 +00:00
&group_info,
&subgroup_info,
parent_group);
2015-06-02 18:26:27 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_ONLINE_UPDATER,
MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER,
&group_info,
&subgroup_info,
parent_group);
#endif
2016-03-20 18:54:16 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_SETTINGS,
MENU_ENUM_LABEL_VALUE_SETTINGS,
2016-03-20 18:54:16 +00:00
&group_info,
&subgroup_info,
parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 18:54:16 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_INFORMATION_LIST,
MENU_ENUM_LABEL_VALUE_INFORMATION_LIST,
2016-03-20 18:54:16 +00:00
&group_info,
&subgroup_info,
parent_group);
2015-06-22 06:06:54 +00:00
#ifndef __CELLOS_LV2__
2016-03-20 18:54:16 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_RESTART_RETROARCH,
MENU_ENUM_LABEL_VALUE_RESTART_RETROARCH,
2016-03-20 18:54:16 +00:00
&group_info,
&subgroup_info,
parent_group);
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_RESTART_RETROARCH);
#endif
2015-06-02 18:26:27 +00:00
2016-11-04 14:03:09 +00:00
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_CONFIGURATIONS_LIST,
MENU_ENUM_LABEL_VALUE_CONFIGURATIONS_LIST,
2016-11-04 14:03:09 +00:00
&group_info,
&subgroup_info,
parent_group);
2016-03-20 18:54:16 +00:00
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_CONFIGURATIONS,
MENU_ENUM_LABEL_VALUE_CONFIGURATIONS,
2016-03-20 18:54:16 +00:00
&group_info,
&subgroup_info,
parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 18:54:16 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG,
MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG,
2016-03-20 18:54:16 +00:00
&group_info,
&subgroup_info,
parent_group);
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_MENU_SAVE_CURRENT_CONFIG);
2015-11-11 01:57:20 +00:00
2016-03-20 18:54:16 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_SAVE_NEW_CONFIG,
MENU_ENUM_LABEL_VALUE_SAVE_NEW_CONFIG,
2016-03-20 18:54:16 +00:00
&group_info,
&subgroup_info,
parent_group);
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_MENU_SAVE_CONFIG);
2015-06-02 18:26:27 +00:00
2016-08-25 05:54:39 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE,
MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_CORE,
2016-08-25 05:54:39 +00:00
&group_info,
&subgroup_info,
parent_group);
2016-08-26 14:43:29 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_CORE);
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME,
MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_GAME,
2016-08-26 14:43:29 +00:00
&group_info,
&subgroup_info,
parent_group);
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_GAME);
2016-08-25 05:54:39 +00:00
2016-03-20 18:54:16 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_HELP_LIST,
MENU_ENUM_LABEL_VALUE_HELP_LIST,
2016-03-20 18:54:16 +00:00
&group_info,
&subgroup_info,
parent_group);
2015-06-02 18:26:27 +00:00
#if !defined(IOS)
2016-03-20 18:54:16 +00:00
/* Apple rejects iOS apps that lets you forcibly quit an application. */
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_QUIT_RETROARCH,
MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH,
2016-03-20 18:54:16 +00:00
&group_info,
&subgroup_info,
parent_group);
2016-05-11 18:56:02 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_QUIT);
2015-06-02 18:26:27 +00:00
#endif
#if defined(HAVE_LAKKA)
2016-03-20 18:54:16 +00:00
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_REBOOT,
MENU_ENUM_LABEL_VALUE_REBOOT,
2016-03-20 18:54:16 +00:00
&group_info,
&subgroup_info,
parent_group);
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REBOOT);
2016-03-20 18:54:16 +00:00
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_SHUTDOWN,
MENU_ENUM_LABEL_VALUE_SHUTDOWN,
2016-03-20 18:54:16 +00:00
&group_info,
&subgroup_info,
parent_group);
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_SHUTDOWN);
2016-01-18 19:31:38 +00:00
#endif
2016-06-16 19:40:13 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_DRIVER_SETTINGS,
MENU_ENUM_LABEL_VALUE_DRIVER_SETTINGS,
2016-06-16 19:40:13 +00:00
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_VIDEO_SETTINGS,
MENU_ENUM_LABEL_VALUE_VIDEO_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_AUDIO_SETTINGS,
MENU_ENUM_LABEL_VALUE_AUDIO_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
2016-03-20 18:54:16 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_INPUT_SETTINGS,
MENU_ENUM_LABEL_VALUE_INPUT_SETTINGS,
2016-03-20 18:54:16 +00:00
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_CORE_SETTINGS,
MENU_ENUM_LABEL_VALUE_CORE_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
2016-12-01 23:23:08 +00:00
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
2016-06-18 20:17:39 +00:00
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_CONFIGURATION_SETTINGS,
MENU_ENUM_LABEL_VALUE_CONFIGURATION_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_SAVING_SETTINGS,
MENU_ENUM_LABEL_VALUE_SAVING_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_LOGGING_SETTINGS,
MENU_ENUM_LABEL_VALUE_LOGGING_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_FRAME_THROTTLE_SETTINGS,
MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_REWIND_SETTINGS,
MENU_ENUM_LABEL_VALUE_REWIND_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
2016-10-02 05:54:56 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_RECORDING_SETTINGS,
MENU_ENUM_LABEL_VALUE_RECORDING_SETTINGS,
2016-10-02 05:54:56 +00:00
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_ONSCREEN_DISPLAY_SETTINGS,
MENU_ENUM_LABEL_VALUE_ONSCREEN_DISPLAY_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_ONSCREEN_OVERLAY_SETTINGS,
MENU_ENUM_LABEL_VALUE_ONSCREEN_OVERLAY_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
2016-11-23 13:28:15 +00:00
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_SETTINGS,
MENU_ENUM_LABEL_VALUE_ONSCREEN_NOTIFICATIONS_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
2016-07-02 18:40:27 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_MENU_SETTINGS,
MENU_ENUM_LABEL_VALUE_MENU_SETTINGS,
2016-07-02 18:40:27 +00:00
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_USER_INTERFACE_SETTINGS,
MENU_ENUM_LABEL_VALUE_USER_INTERFACE_SETTINGS,
2016-07-02 18:40:27 +00:00
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_MENU_FILE_BROWSER_SETTINGS,
MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
2016-07-02 18:40:27 +00:00
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_RETRO_ACHIEVEMENTS_SETTINGS,
MENU_ENUM_LABEL_VALUE_RETRO_ACHIEVEMENTS_SETTINGS,
2016-07-02 18:40:27 +00:00
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_UPDATER_SETTINGS,
MENU_ENUM_LABEL_VALUE_UPDATER_SETTINGS,
2016-07-02 18:40:27 +00:00
&group_info,
&subgroup_info,
parent_group);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
2016-07-02 18:40:27 +00:00
if (!string_is_equal(settings->wifi.driver, "null"))
{
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_WIFI_SETTINGS,
MENU_ENUM_LABEL_VALUE_WIFI_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
}
2016-09-21 19:58:43 +00:00
2016-07-02 18:40:27 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_NETWORK_SETTINGS,
MENU_ENUM_LABEL_VALUE_NETWORK_SETTINGS,
2016-07-02 18:40:27 +00:00
&group_info,
&subgroup_info,
parent_group);
#ifdef HAVE_LAKKA
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_LAKKA_SERVICES,
MENU_ENUM_LABEL_VALUE_LAKKA_SERVICES,
&group_info,
&subgroup_info,
parent_group);
#endif
2016-03-20 18:54:16 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_PLAYLIST_SETTINGS,
MENU_ENUM_LABEL_VALUE_PLAYLIST_SETTINGS,
2016-03-20 18:54:16 +00:00
&group_info,
&subgroup_info,
parent_group);
2015-06-02 18:26:27 +00:00
2016-07-02 18:40:27 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_USER_SETTINGS,
MENU_ENUM_LABEL_VALUE_USER_SETTINGS,
2016-07-02 18:40:27 +00:00
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_DIRECTORY_SETTINGS,
MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS,
2016-07-02 18:40:27 +00:00
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_PRIVACY_SETTINGS,
MENU_ENUM_LABEL_VALUE_PRIVACY_SETTINGS,
2016-07-02 18:40:27 +00:00
&group_info,
&subgroup_info,
parent_group);
2016-03-20 18:54:16 +00:00
for (user = 0; user < MAX_USERS; user++)
setting_append_list_input_player_options(list, list_info, parent_group, user);
2015-06-02 18:26:27 +00:00
2016-03-20 18:54:16 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_DRIVERS:
2016-10-26 05:58:21 +00:00
{
unsigned i;
2016-10-26 06:02:17 +00:00
struct string_options_entry string_options_entries[10];
2016-10-26 05:58:21 +00:00
START_GROUP(list, list_info, &group_info, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DRIVER_SETTINGS), parent_group);
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_DRIVER_SETTINGS);
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS);
START_SUB_GROUP(list, list_info, "State", &group_info,
&subgroup_info, parent_group);
string_options_entries[0].target = settings->input.driver;
string_options_entries[0].len = sizeof(settings->input.driver);
string_options_entries[0].name_enum_idx = MENU_ENUM_LABEL_INPUT_DRIVER;
string_options_entries[0].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_INPUT_DRIVER;
string_options_entries[0].default_value = config_get_default_input();
string_options_entries[0].values = config_get_input_driver_options();
string_options_entries[1].target = settings->input.joypad_driver;
string_options_entries[1].len = sizeof(settings->input.joypad_driver);
string_options_entries[1].name_enum_idx = MENU_ENUM_LABEL_JOYPAD_DRIVER;
string_options_entries[1].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_JOYPAD_DRIVER;
string_options_entries[1].default_value = config_get_default_joypad();
string_options_entries[1].values = config_get_joypad_driver_options();
string_options_entries[2].target = settings->video.driver;
string_options_entries[2].len = sizeof(settings->video.driver);
string_options_entries[2].name_enum_idx = MENU_ENUM_LABEL_VIDEO_DRIVER;
string_options_entries[2].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER;
string_options_entries[2].default_value = config_get_default_video();
string_options_entries[2].values = config_get_video_driver_options();
string_options_entries[3].target = settings->audio.driver;
string_options_entries[3].len = sizeof(settings->audio.driver);
string_options_entries[3].name_enum_idx = MENU_ENUM_LABEL_AUDIO_DRIVER;
string_options_entries[3].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_AUDIO_DRIVER;
string_options_entries[3].default_value = config_get_default_audio();
string_options_entries[3].values = config_get_audio_driver_options();
string_options_entries[4].target = settings->audio.resampler;
string_options_entries[4].len = sizeof(settings->audio.resampler);
string_options_entries[4].name_enum_idx = MENU_ENUM_LABEL_AUDIO_RESAMPLER_DRIVER;
string_options_entries[4].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_DRIVER;
string_options_entries[4].default_value = config_get_default_audio_resampler();
string_options_entries[4].values = config_get_audio_resampler_driver_options();
string_options_entries[5].target = settings->camera.driver;
string_options_entries[5].len = sizeof(settings->camera.driver);
string_options_entries[5].name_enum_idx = MENU_ENUM_LABEL_CAMERA_DRIVER;
string_options_entries[5].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_CAMERA_DRIVER;
string_options_entries[5].default_value = config_get_default_camera();
string_options_entries[5].values = config_get_camera_driver_options();
string_options_entries[6].target = settings->wifi.driver;
string_options_entries[6].len = sizeof(settings->wifi.driver);
string_options_entries[6].name_enum_idx = MENU_ENUM_LABEL_WIFI_DRIVER;
string_options_entries[6].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_WIFI_DRIVER;
string_options_entries[6].default_value = config_get_default_wifi();
string_options_entries[6].values = config_get_wifi_driver_options();
2016-10-26 06:02:17 +00:00
string_options_entries[7].target = settings->location.driver;
string_options_entries[7].len = sizeof(settings->location.driver);
string_options_entries[7].name_enum_idx = MENU_ENUM_LABEL_LOCATION_DRIVER;
string_options_entries[7].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_LOCATION_DRIVER;
string_options_entries[7].default_value = config_get_default_location();
string_options_entries[7].values = config_get_location_driver_options();
string_options_entries[8].target = settings->menu.driver;
string_options_entries[8].len = sizeof(settings->menu.driver);
string_options_entries[8].name_enum_idx = MENU_ENUM_LABEL_MENU_DRIVER;
string_options_entries[8].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_MENU_DRIVER;
string_options_entries[8].default_value = config_get_default_menu();
string_options_entries[8].values = config_get_menu_driver_options();
string_options_entries[9].target = settings->record.driver;
string_options_entries[9].len = sizeof(settings->record.driver);
string_options_entries[9].name_enum_idx = MENU_ENUM_LABEL_RECORD_DRIVER;
string_options_entries[9].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_RECORD_DRIVER;
string_options_entries[9].default_value = config_get_default_record();
string_options_entries[9].values = config_get_record_driver_options();
2016-10-26 05:58:21 +00:00
for (i = 0; i < ARRAY_SIZE(string_options_entries); i++)
{
CONFIG_STRING_OPTIONS(
list, list_info,
string_options_entries[i].target,
string_options_entries[i].len,
string_options_entries[i].name_enum_idx,
string_options_entries[i].SHORT_enum_idx,
string_options_entries[i].default_value,
string_options_entries[i].values,
&group_info,
&subgroup_info,
parent_group,
general_read_handler,
general_write_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_IS_DRIVER);
(*list)[list_info->index - 1].action_left = setting_string_action_left_driver;
(*list)[list_info->index - 1].action_right = setting_string_action_right_driver;
}
2016-03-20 18:54:16 +00:00
2016-10-26 05:58:21 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
}
2016-05-23 19:39:17 +00:00
break;
2016-03-20 18:54:16 +00:00
case SETTINGS_LIST_CORE:
2016-10-26 05:32:42 +00:00
{
unsigned i;
struct bool_entry bool_entries[5];
2016-06-18 20:17:39 +00:00
2016-10-26 05:32:42 +00:00
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_SETTINGS), parent_group);
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_CORE_SETTINGS);
2016-03-20 18:54:16 +00:00
2016-10-26 05:32:42 +00:00
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
2016-03-20 18:54:16 +00:00
2016-10-26 05:32:42 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS);
2016-10-26 05:32:42 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info,
parent_group);
2015-06-02 18:26:27 +00:00
2016-10-26 05:32:42 +00:00
bool_entries[0].target = &settings->video.shared_context;
bool_entries[0].name_enum_idx = MENU_ENUM_LABEL_VIDEO_SHARED_CONTEXT;
bool_entries[0].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_VIDEO_SHARED_CONTEXT;
bool_entries[0].default_value = video_shared_context;
bool_entries[0].flags = SD_FLAG_ADVANCED;
bool_entries[1].target = &settings->load_dummy_on_core_shutdown;
bool_entries[1].name_enum_idx = MENU_ENUM_LABEL_DUMMY_ON_CORE_SHUTDOWN;
bool_entries[1].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN;
bool_entries[1].default_value = load_dummy_on_core_shutdown;
bool_entries[1].flags = SD_FLAG_ADVANCED;
bool_entries[2].target = &settings->set_supports_no_game_enable;
bool_entries[2].name_enum_idx = MENU_ENUM_LABEL_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE;
bool_entries[2].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE;
bool_entries[2].default_value = true;
bool_entries[2].flags = SD_FLAG_ADVANCED;
bool_entries[3].target = &settings->check_firmware_before_loading;
bool_entries[3].name_enum_idx = MENU_ENUM_LABEL_CHECK_FOR_MISSING_FIRMWARE;
bool_entries[3].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_CHECK_FOR_MISSING_FIRMWARE;
bool_entries[3].default_value = true;
bool_entries[3].flags = SD_FLAG_ADVANCED;
bool_entries[4].target = &settings->video.allow_rotate;
bool_entries[4].name_enum_idx = MENU_ENUM_LABEL_VIDEO_ALLOW_ROTATE;
bool_entries[4].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE;
bool_entries[4].default_value = allow_rotate;
bool_entries[4].flags = SD_FLAG_ADVANCED;
2016-10-26 05:32:42 +00:00
for (i = 0; i < ARRAY_SIZE(bool_entries); i++)
{
CONFIG_BOOL(
list, list_info,
bool_entries[i].target,
bool_entries[i].name_enum_idx,
bool_entries[i].SHORT_enum_idx,
bool_entries[i].default_value,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
bool_entries[i].flags);
}
2015-06-02 18:26:27 +00:00
2016-10-26 05:32:42 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
}
2016-03-20 18:54:16 +00:00
break;
2016-03-20 19:45:06 +00:00
case SETTINGS_LIST_CONFIGURATION:
2016-10-26 05:36:23 +00:00
{
unsigned i;
struct bool_entry bool_entries[6];
2016-10-26 05:36:23 +00:00
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONFIGURATION_SETTINGS), parent_group);
2015-06-02 18:26:27 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_CONFIGURATION_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-10-26 05:36:23 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info,
parent_group);
2015-06-02 18:26:27 +00:00
2016-10-26 05:36:23 +00:00
bool_entries[0].target = &settings->config_save_on_exit;
bool_entries[0].name_enum_idx = MENU_ENUM_LABEL_CONFIG_SAVE_ON_EXIT;
bool_entries[0].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT;
bool_entries[0].default_value = config_save_on_exit;
bool_entries[0].flags = SD_FLAG_NONE;
2015-06-02 18:26:27 +00:00
bool_entries[1].target = &settings->show_hidden_files;
bool_entries[1].name_enum_idx = MENU_ENUM_LABEL_SHOW_HIDDEN_FILES;
bool_entries[1].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_SHOW_HIDDEN_FILES;
bool_entries[1].default_value = show_hidden_files;
bool_entries[1].flags = SD_FLAG_NONE;
bool_entries[2].target = &settings->game_specific_options;
bool_entries[2].name_enum_idx = MENU_ENUM_LABEL_GAME_SPECIFIC_OPTIONS;
bool_entries[2].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS;
bool_entries[2].default_value = default_game_specific_options;
2016-10-26 05:36:23 +00:00
bool_entries[2].flags = SD_FLAG_NONE;
bool_entries[3].target = &settings->auto_overrides_enable;
bool_entries[3].name_enum_idx = MENU_ENUM_LABEL_AUTO_OVERRIDES_ENABLE;
bool_entries[3].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_AUTO_OVERRIDES_ENABLE;
bool_entries[3].default_value = default_auto_overrides_enable;
bool_entries[3].flags = SD_FLAG_ADVANCED;
2016-10-26 05:40:01 +00:00
bool_entries[4].target = &settings->auto_remaps_enable;
bool_entries[4].name_enum_idx = MENU_ENUM_LABEL_AUTO_REMAPS_ENABLE;
bool_entries[4].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_AUTO_REMAPS_ENABLE;
bool_entries[4].default_value = default_auto_remaps_enable;
bool_entries[4].flags = SD_FLAG_ADVANCED;
2016-10-26 05:40:01 +00:00
bool_entries[5].target = &settings->auto_shaders_enable;
bool_entries[5].name_enum_idx = MENU_ENUM_LABEL_AUTO_SHADERS_ENABLE;
bool_entries[5].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_AUTO_SHADERS_ENABLE;
bool_entries[5].default_value = default_auto_shaders_enable;
2016-10-26 05:40:01 +00:00
bool_entries[5].flags = SD_FLAG_NONE;
2016-10-26 05:36:23 +00:00
for (i = 0; i < ARRAY_SIZE(bool_entries); i++)
{
CONFIG_BOOL(
list, list_info,
bool_entries[i].target,
bool_entries[i].name_enum_idx,
bool_entries[i].SHORT_enum_idx,
bool_entries[i].default_value,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
bool_entries[i].flags);
}
2015-06-02 18:26:27 +00:00
2016-10-26 05:36:23 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
}
2016-03-20 19:45:06 +00:00
break;
case SETTINGS_LIST_LOGGING:
{
bool *tmp_b = NULL;
START_GROUP(list, list_info, &group_info, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LOGGING_SETTINGS), parent_group);
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_LOGGING_SETTINGS);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info,
parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
2016-05-31 02:42:04 +00:00
verbosity_get_ptr(),
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_LOG_VERBOSITY,
MENU_ENUM_LABEL_VALUE_LOG_VERBOSITY,
2016-03-20 19:45:06 +00:00
false,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->libretro_log_level,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_LIBRETRO_LOG_LEVEL,
MENU_ENUM_LABEL_VALUE_LIBRETRO_LOG_LEVEL,
2016-03-20 19:45:06 +00:00
libretro_log_level,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 3, 1.0, true, true);
(*list)[list_info->index - 1].get_string_representation =
2016-03-20 19:45:06 +00:00
&setting_get_string_representation_uint_libretro_log_level;
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
END_SUB_GROUP(list, list_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "Performance Counters", &group_info, &subgroup_info,
parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
runloop_ctl(RUNLOOP_CTL_GET_PERFCNT, &tmp_b);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
tmp_b,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_PERFCNT_ENABLE,
MENU_ENUM_LABEL_VALUE_PERFCNT_ENABLE,
2016-03-20 19:45:06 +00:00
false,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED);
2016-03-20 19:45:06 +00:00
}
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_SAVING:
2016-10-27 02:12:49 +00:00
{
unsigned i;
struct bool_entry bool_entries[7];
2015-06-02 18:26:27 +00:00
2016-10-27 02:12:49 +00:00
START_GROUP(list, list_info, &group_info, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVING_SETTINGS), parent_group);
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SAVING_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-10-27 02:12:49 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info,
parent_group);
2015-06-02 18:26:27 +00:00
2016-10-27 02:12:49 +00:00
bool_entries[0].target = &settings->sort_savefiles_enable;
bool_entries[0].name_enum_idx = MENU_ENUM_LABEL_SORT_SAVEFILES_ENABLE;
bool_entries[0].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_SORT_SAVEFILES_ENABLE;
bool_entries[0].default_value = default_sort_savefiles_enable;
bool_entries[0].flags = SD_FLAG_ADVANCED;
2016-03-20 19:45:06 +00:00
2016-10-27 02:12:49 +00:00
bool_entries[1].target = &settings->sort_savestates_enable;
bool_entries[1].name_enum_idx = MENU_ENUM_LABEL_SORT_SAVESTATES_ENABLE;
bool_entries[1].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_SORT_SAVESTATES_ENABLE;
bool_entries[1].default_value = default_sort_savestates_enable;
bool_entries[1].flags = SD_FLAG_ADVANCED;
2015-06-02 18:26:27 +00:00
2016-10-27 02:12:49 +00:00
bool_entries[2].target = &settings->block_sram_overwrite;
bool_entries[2].name_enum_idx = MENU_ENUM_LABEL_BLOCK_SRAM_OVERWRITE;
bool_entries[2].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_BLOCK_SRAM_OVERWRITE;
bool_entries[2].default_value = block_sram_overwrite;
bool_entries[2].flags = SD_FLAG_NONE;
2015-06-02 18:26:27 +00:00
2016-10-27 02:12:49 +00:00
bool_entries[3].target = &settings->savestate_auto_index;
bool_entries[3].name_enum_idx = MENU_ENUM_LABEL_SAVESTATE_AUTO_INDEX;
bool_entries[3].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_INDEX;
bool_entries[3].default_value = savestate_auto_index;
bool_entries[3].flags = SD_FLAG_NONE;
2015-06-02 18:26:27 +00:00
2016-10-27 02:12:49 +00:00
bool_entries[4].target = &settings->savestate_auto_save;
bool_entries[4].name_enum_idx = MENU_ENUM_LABEL_SAVESTATE_AUTO_SAVE;
bool_entries[4].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE;
bool_entries[4].default_value = savestate_auto_save;
bool_entries[4].flags = SD_FLAG_NONE;
2015-06-02 18:26:27 +00:00
2016-10-27 02:12:49 +00:00
bool_entries[5].target = &settings->savestate_auto_load;
bool_entries[5].name_enum_idx = MENU_ENUM_LABEL_SAVESTATE_AUTO_LOAD;
bool_entries[5].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD;
bool_entries[5].default_value = savestate_auto_load;
bool_entries[5].flags = SD_FLAG_NONE;
2015-06-02 18:26:27 +00:00
bool_entries[6].target = &settings->savestate_thumbnail_enable;
bool_entries[6].name_enum_idx = MENU_ENUM_LABEL_SAVESTATE_THUMBNAIL_ENABLE;
bool_entries[6].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_SAVESTATE_THUMBNAIL_ENABLE;
bool_entries[6].default_value = savestate_thumbnail_enable;
bool_entries[6].flags = SD_FLAG_ADVANCED;
2016-10-27 02:12:49 +00:00
for (i = 0; i < ARRAY_SIZE(bool_entries); i++)
{
CONFIG_BOOL(
list, list_info,
bool_entries[i].target,
bool_entries[i].name_enum_idx,
bool_entries[i].SHORT_enum_idx,
bool_entries[i].default_value,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
bool_entries[i].flags);
}
#ifdef HAVE_THREADS
CONFIG_UINT(
list, list_info,
&settings->autosave_interval,
MENU_ENUM_LABEL_AUTOSAVE_INTERVAL,
MENU_ENUM_LABEL_VALUE_AUTOSAVE_INTERVAL,
autosave_interval,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_AUTOSAVE_INIT);
menu_settings_list_current_add_range(list, list_info, 0, 0, 10, true, false);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
(*list)[list_info->index - 1].get_string_representation =
2016-10-27 02:12:49 +00:00
&setting_get_string_representation_uint_autosave_interval;
#endif
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
}
2016-03-20 19:45:06 +00:00
break;
case SETTINGS_LIST_REWIND:
START_GROUP(list, list_info, &group_info, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_REWIND_SETTINGS), parent_group);
2015-06-02 18:26:27 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_REWIND_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->rewind_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_REWIND_ENABLE,
MENU_ENUM_LABEL_VALUE_REWIND_ENABLE,
2016-03-20 19:45:06 +00:00
rewind_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_CMD_APPLY_AUTO);
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REWIND_TOGGLE);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
#if 0
CONFIG_SIZE(
settings->rewind_buffer_size,
"rewind_buffer_size",
"Rewind Buffer Size",
rewind_buffer_size,
group_info,
subgroup_info,
parent_group,
general_write_handler,
general_read_handler)
#endif
CONFIG_UINT(
list, list_info,
&settings->rewind_granularity,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_REWIND_GRANULARITY,
MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY,
2016-03-20 19:45:06 +00:00
rewind_granularity,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 1, 32768, 1, true, false);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_VIDEO:
START_GROUP(list, list_info, &group_info, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_SETTINGS), parent_group);
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_VIDEO_SETTINGS);
2015-06-02 18:26:27 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS);
2015-10-08 04:47:45 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
2015-06-02 18:26:27 +00:00
#if !defined(RARCH_CONSOLE) && !defined(RARCH_MOBILE)
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->ui.suspend_screensaver_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_SUSPEND_SCREENSAVER_ENABLE,
MENU_ENUM_LABEL_VALUE_SUSPEND_SCREENSAVER_ENABLE,
2016-03-20 19:45:06 +00:00
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
#endif
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->fps_show,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_FPS_SHOW,
MENU_ENUM_LABEL_VALUE_FPS_SHOW,
2016-03-20 19:45:06 +00:00
fps_show,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
2015-12-10 11:37:24 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
START_SUB_GROUP(list, list_info, "Platform-specific", &group_info, &subgroup_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
video_driver_menu_settings((void**)list, (void*)list_info, (void*)&group_info, (void*)&subgroup_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
START_SUB_GROUP(list, list_info, "Monitor", &group_info, &subgroup_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->video.monitor_index,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_VIDEO_MONITOR_INDEX,
MENU_ENUM_LABEL_VALUE_VIDEO_MONITOR_INDEX,
2016-03-20 19:45:06 +00:00
monitor_index,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REINIT);
2016-03-20 19:45:06 +00:00
menu_settings_list_current_add_range(list, list_info, 0, 1, 1, true, false);
(*list)[list_info->index - 1].get_string_representation =
2016-03-20 19:45:06 +00:00
&setting_get_string_representation_uint_video_monitor_index;
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
2016-05-08 12:00:51 +00:00
if (video_driver_has_windowed())
2016-03-20 19:45:06 +00:00
{
CONFIG_BOOL(
list, list_info,
&settings->video.fullscreen,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VIDEO_FULLSCREEN,
MENU_ENUM_LABEL_VALUE_VIDEO_FULLSCREEN,
2016-03-20 19:45:06 +00:00
fullscreen,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_CMD_APPLY_AUTO);
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REINIT);
2016-03-20 19:45:06 +00:00
}
2016-05-08 12:00:51 +00:00
if (video_driver_has_windowed())
2016-03-20 19:45:06 +00:00
{
CONFIG_BOOL(
list, list_info,
&settings->video.windowed_fullscreen,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VIDEO_WINDOWED_FULLSCREEN,
MENU_ENUM_LABEL_VALUE_VIDEO_WINDOWED_FULLSCREEN,
2016-03-20 19:45:06 +00:00
windowed_fullscreen,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
2016-03-20 19:45:06 +00:00
}
CONFIG_FLOAT(
list, list_info,
&settings->video.refresh_rate,
2016-10-26 03:07:27 +00:00
MENU_ENUM_LABEL_VIDEO_REFRESH_RATE,
MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE,
2016-03-20 19:45:06 +00:00
refresh_rate,
"%.3f Hz",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 0, 0.001, true, false);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_FLOAT(
list, list_info,
&settings->video.refresh_rate,
2016-10-26 03:07:27 +00:00
MENU_ENUM_LABEL_VIDEO_REFRESH_RATE_AUTO,
MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE_AUTO,
2016-03-20 19:45:06 +00:00
refresh_rate,
"%.3f Hz",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
(*list)[list_info->index - 1].action_start = &setting_action_start_video_refresh_rate_auto;
(*list)[list_info->index - 1].action_ok = &setting_action_ok_video_refresh_rate_auto;
(*list)[list_info->index - 1].action_select = &setting_action_ok_video_refresh_rate_auto;
(*list)[list_info->index - 1].get_string_representation =
2016-03-20 19:45:06 +00:00
&setting_get_string_representation_st_float_video_refresh_rate_auto;
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
if (string_is_equal(settings->video.driver, "gl"))
{
CONFIG_BOOL(
list, list_info,
&settings->video.force_srgb_disable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VIDEO_FORCE_SRGB_DISABLE,
MENU_ENUM_LABEL_VALUE_VIDEO_FORCE_SRGB_DISABLE,
2016-03-20 19:45:06 +00:00
false,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_CMD_APPLY_AUTO | SD_FLAG_ADVANCED
);
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REINIT);
2016-03-20 19:45:06 +00:00
}
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
START_SUB_GROUP(list, list_info, "Aspect", &group_info, &subgroup_info, parent_group);
CONFIG_UINT(
list, list_info,
&settings->video.aspect_ratio_idx,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_VIDEO_ASPECT_RATIO_INDEX,
MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX,
2016-03-20 19:45:06 +00:00
aspect_ratio_idx,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_cmd(
list,
list_info,
2016-05-09 18:51:53 +00:00
CMD_EVENT_VIDEO_SET_ASPECT_RATIO);
2016-03-20 19:45:06 +00:00
menu_settings_list_current_add_range(
list,
list_info,
0,
LAST_ASPECT_RATIO,
1,
true,
true);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
(*list)[list_info->index - 1].get_string_representation =
2016-03-20 19:45:06 +00:00
&setting_get_string_representation_uint_aspect_ratio_index;
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_INT(
list, list_info,
&settings->video_viewport_custom.x,
2016-10-26 03:32:28 +00:00
MENU_ENUM_LABEL_VIDEO_VIEWPORT_CUSTOM_X,
MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_X,
2016-03-20 19:45:06 +00:00
0,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, -99999, 0, 1, false, false);
menu_settings_list_current_add_cmd(
list,
list_info,
2016-05-09 18:51:53 +00:00
CMD_EVENT_VIDEO_APPLY_STATE_CHANGES);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_INT(
list, list_info,
&settings->video_viewport_custom.y,
2016-10-26 03:32:28 +00:00
MENU_ENUM_LABEL_VIDEO_VIEWPORT_CUSTOM_Y,
MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_Y,
2016-03-20 19:45:06 +00:00
0,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, -99999, 0, 1, false, false);
menu_settings_list_current_add_cmd(
list,
list_info,
2016-05-09 18:51:53 +00:00
CMD_EVENT_VIDEO_APPLY_STATE_CHANGES);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->video_viewport_custom.width,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_VIDEO_VIEWPORT_CUSTOM_WIDTH,
MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_WIDTH,
2016-03-20 19:45:06 +00:00
0,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 0, 1, true, false);
(*list)[list_info->index - 1].get_string_representation =
&setting_get_string_representation_uint_custom_viewport_width;
2016-03-20 19:45:06 +00:00
(*list)[list_info->index - 1].action_start = &setting_action_start_custom_viewport_width;
(*list)[list_info->index - 1].action_left = setting_uint_action_left_custom_viewport_width;
(*list)[list_info->index - 1].action_right = setting_uint_action_right_custom_viewport_width;
menu_settings_list_current_add_cmd(
list,
list_info,
2016-05-09 18:51:53 +00:00
CMD_EVENT_VIDEO_APPLY_STATE_CHANGES);
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->video_viewport_custom.height,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_VIDEO_VIEWPORT_CUSTOM_HEIGHT,
MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_HEIGHT,
2016-03-20 19:45:06 +00:00
0,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 0, 1, true, false);
(*list)[list_info->index - 1].get_string_representation =
&setting_get_string_representation_uint_custom_viewport_height;
2016-03-20 19:45:06 +00:00
(*list)[list_info->index - 1].action_start = &setting_action_start_custom_viewport_height;
(*list)[list_info->index - 1].action_left = setting_uint_action_left_custom_viewport_height;
(*list)[list_info->index - 1].action_right = setting_uint_action_right_custom_viewport_height;
menu_settings_list_current_add_cmd(
list,
list_info,
2016-05-09 18:51:53 +00:00
CMD_EVENT_VIDEO_APPLY_STATE_CHANGES);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
START_SUB_GROUP(list, list_info, "Scaling", &group_info, &subgroup_info, parent_group);
2016-05-08 12:00:51 +00:00
if (video_driver_has_windowed())
2016-03-20 19:45:06 +00:00
{
CONFIG_FLOAT(
list, list_info,
&settings->video.scale,
2016-10-26 03:07:27 +00:00
MENU_ENUM_LABEL_VIDEO_SCALE,
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE,
2016-03-20 19:45:06 +00:00
scale,
"%.1fx",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 1.0, 10.0, 1.0, true, true);
2016-11-24 00:43:50 +00:00
CONFIG_UINT(
list, list_info,
&settings->video.window_x,
MENU_ENUM_LABEL_VIDEO_WINDOW_WIDTH,
MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_WIDTH,
0,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 7680, 8, true, true);
CONFIG_UINT(
list, list_info,
&settings->video.window_y,
MENU_ENUM_LABEL_VIDEO_WINDOW_HEIGHT,
MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_HEIGHT,
0,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 4320, 8, true, true);
2016-03-20 19:45:06 +00:00
}
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->video.scale_integer,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER,
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER,
2016-03-20 19:45:06 +00:00
scale_integer,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
2016-03-20 19:45:06 +00:00
menu_settings_list_current_add_cmd(
list,
list_info,
2016-05-09 18:51:53 +00:00
CMD_EVENT_VIDEO_APPLY_STATE_CHANGES);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
#ifdef GEKKO
CONFIG_UINT(
list, list_info,
&settings->video.viwidth,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_VIDEO_VI_WIDTH,
MENU_ENUM_LABEL_VALUE_VIDEO_VI_WIDTH,
2016-03-20 19:45:06 +00:00
video_viwidth,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 640, 720, 2, true, true);
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->video.vfilter,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VIDEO_VFILTER,
MENU_ENUM_LABEL_VALUE_VIDEO_VFILTER,
2016-03-20 19:45:06 +00:00
video_vfilter,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
2015-06-02 18:26:27 +00:00
#endif
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->video.smooth,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VIDEO_SMOOTH,
MENU_ENUM_LABEL_VALUE_VIDEO_SMOOTH,
2016-03-20 19:45:06 +00:00
video_smooth,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REINIT);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->video.rotation,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_VIDEO_ROTATION,
MENU_ENUM_LABEL_VALUE_VIDEO_ROTATION,
2016-03-20 19:45:06 +00:00
0,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
(*list)[list_info->index - 1].get_string_representation =
2016-03-20 19:45:06 +00:00
&setting_get_string_representation_uint_video_rotation;
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
START_SUB_GROUP(
list,
list_info,
"Synchronization",
&group_info,
&subgroup_info,
parent_group);
2016-05-10 22:40:34 +00:00
#if defined(HAVE_THREADS)
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->video.threaded,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VIDEO_THREADED,
MENU_ENUM_LABEL_VALUE_VIDEO_THREADED,
2016-03-20 19:45:06 +00:00
video_threaded,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_CMD_APPLY_AUTO
);
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REINIT);
2016-03-20 19:45:06 +00:00
#endif
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->video.vsync,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VIDEO_VSYNC,
MENU_ENUM_LABEL_VALUE_VIDEO_VSYNC,
2016-03-20 19:45:06 +00:00
vsync,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2015-06-02 18:26:27 +00:00
CONFIG_UINT(
list, list_info,
2016-10-24 09:51:51 +00:00
&settings->video.swap_interval,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_VIDEO_SWAP_INTERVAL,
MENU_ENUM_LABEL_VALUE_VIDEO_SWAP_INTERVAL,
2016-10-24 09:51:51 +00:00
swap_interval,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2016-10-24 09:51:51 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_VIDEO_SET_BLOCKING_STATE);
menu_settings_list_current_add_range(list, list_info, 1, 4, 1, true, true);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
2016-10-24 09:51:51 +00:00
&settings->video.max_swapchain_images,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_VIDEO_MAX_SWAPCHAIN_IMAGES,
MENU_ENUM_LABEL_VALUE_VIDEO_MAX_SWAPCHAIN_IMAGES,
2016-10-24 09:51:51 +00:00
max_swapchain_images,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 1, 4, 1, true, true);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
2015-06-02 18:26:27 +00:00
if (string_is_equal(settings->video.driver, "gl"))
{
CONFIG_BOOL(
list, list_info,
&settings->video.hard_sync,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VIDEO_HARD_SYNC,
MENU_ENUM_LABEL_VALUE_VIDEO_HARD_SYNC,
hard_sync,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2015-06-02 18:26:27 +00:00
CONFIG_UINT(
list, list_info,
&settings->video.hard_sync_frames,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_VIDEO_HARD_SYNC_FRAMES,
MENU_ENUM_LABEL_VALUE_VIDEO_HARD_SYNC_FRAMES,
hard_sync_frames,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
}
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->video.frame_delay,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_VIDEO_FRAME_DELAY,
MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY,
2016-03-20 19:45:06 +00:00
frame_delay,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 15, 1, true, true);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
#if !defined(RARCH_MOBILE)
CONFIG_BOOL(
list, list_info,
&settings->video.black_frame_insertion,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VIDEO_BLACK_FRAME_INSERTION,
MENU_ENUM_LABEL_VALUE_VIDEO_BLACK_FRAME_INSERTION,
2016-03-20 19:45:06 +00:00
black_frame_insertion,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2016-03-20 19:45:06 +00:00
#endif
END_SUB_GROUP(list, list_info, parent_group);
START_SUB_GROUP(
list,
list_info,
"Miscellaneous",
&group_info,
&subgroup_info,
parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->video.gpu_screenshot,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VIDEO_GPU_SCREENSHOT,
MENU_ENUM_LABEL_VALUE_VIDEO_GPU_SCREENSHOT,
2016-03-20 19:45:06 +00:00
gpu_screenshot,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2016-03-20 19:45:06 +00:00
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->video.crop_overscan,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VIDEO_CROP_OVERSCAN,
MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN,
2016-03-20 19:45:06 +00:00
crop_overscan,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_PATH(
list, list_info,
2016-04-28 18:49:13 +00:00
settings->path.softfilter_plugin,
sizeof(settings->path.softfilter_plugin),
2016-10-26 03:30:45 +00:00
MENU_ENUM_LABEL_VIDEO_FILTER,
MENU_ENUM_LABEL_VALUE_VIDEO_FILTER,
2016-04-28 18:49:13 +00:00
settings->directory.video_filter,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_values(list, list_info, "filt");
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REINIT);
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_AUDIO:
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_AUDIO_SETTINGS), parent_group);
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_AUDIO_SETTINGS);
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->audio.enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_AUDIO_ENABLE,
MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE,
2016-03-20 19:45:06 +00:00
audio_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
2016-06-15 15:43:08 +00:00
SD_FLAG_ADVANCED
);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->audio.mute_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_AUDIO_MUTE,
MENU_ENUM_LABEL_VALUE_AUDIO_MUTE,
2016-03-20 19:45:06 +00:00
false,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2015-11-21 10:22:34 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_FLOAT(
list, list_info,
&settings->audio.volume,
2016-10-26 03:07:27 +00:00
MENU_ENUM_LABEL_AUDIO_VOLUME,
MENU_ENUM_LABEL_VALUE_AUDIO_VOLUME,
2016-03-20 19:45:06 +00:00
audio_volume,
"%.1f",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, -80, 12, 1.0, true, true);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
#ifdef __CELLOS_LV2__
CONFIG_BOOL(
list, list_info,
&global->console.sound.system_bgm_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_SYSTEM_BGM_ENABLE,
MENU_ENUM_LABEL_VALUE_SYSTEM_BGM_ENABLE,
2016-03-20 19:45:06 +00:00
false,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2016-03-20 19:45:06 +00:00
#endif
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(
list,
list_info,
"Synchronization",
&group_info,
&subgroup_info,
parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->audio.sync,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_AUDIO_SYNC,
MENU_ENUM_LABEL_VALUE_AUDIO_SYNC,
2016-03-20 19:45:06 +00:00
audio_sync,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->audio.latency,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_AUDIO_LATENCY,
MENU_ENUM_LABEL_VALUE_AUDIO_LATENCY,
g_defaults.settings.out_latency ?
2016-03-20 19:45:06 +00:00
g_defaults.settings.out_latency : out_latency,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 8, 512, 16.0, true, true);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_FLOAT(
list, list_info,
&settings->audio.rate_control_delta,
2016-10-26 03:07:27 +00:00
MENU_ENUM_LABEL_AUDIO_RATE_CONTROL_DELTA,
MENU_ENUM_LABEL_VALUE_AUDIO_RATE_CONTROL_DELTA,
2016-03-20 19:45:06 +00:00
rate_control_delta,
"%.3f",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(
list,
list_info,
0,
0,
0.001,
true,
false);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_FLOAT(
list, list_info,
&settings->audio.max_timing_skew,
2016-10-26 03:07:27 +00:00
MENU_ENUM_LABEL_AUDIO_MAX_TIMING_SKEW,
MENU_ENUM_LABEL_VALUE_AUDIO_MAX_TIMING_SKEW,
2016-03-20 19:45:06 +00:00
max_timing_skew,
"%.2f",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(
list,
list_info,
0.01,
0.5,
0.01,
true,
true);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
#ifdef RARCH_MOBILE
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->audio.block_frames,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_AUDIO_BLOCK_FRAMES,
MENU_ENUM_LABEL_VALUE_AUDIO_BLOCK_FRAMES,
2016-03-20 19:45:06 +00:00
0,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
#endif
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS);
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(
list,
list_info,
"Miscellaneous",
&group_info,
&subgroup_info,
parent_group);
2015-06-02 18:26:27 +00:00
#if !defined(RARCH_CONSOLE)
2016-03-20 19:45:06 +00:00
CONFIG_STRING(
list, list_info,
settings->audio.device,
sizeof(settings->audio.device),
2016-10-26 03:22:07 +00:00
MENU_ENUM_LABEL_AUDIO_DEVICE,
MENU_ENUM_LABEL_VALUE_AUDIO_DEVICE,
2016-03-20 19:45:06 +00:00
"",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT | SD_FLAG_ADVANCED);
2016-04-27 20:29:58 +00:00
(*list)[list_info->index - 1].action_left = &setting_string_action_left_audio_device;
(*list)[list_info->index - 1].action_right = &setting_string_action_right_audio_device;
#endif
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->audio.out_rate,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_AUDIO_OUTPUT_RATE,
MENU_ENUM_LABEL_VALUE_AUDIO_OUTPUT_RATE,
2016-03-20 19:45:06 +00:00
out_rate,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_PATH(
list, list_info,
2016-04-28 18:49:13 +00:00
settings->path.audio_dsp_plugin,
sizeof(settings->path.audio_dsp_plugin),
2016-10-26 03:30:45 +00:00
MENU_ENUM_LABEL_AUDIO_DSP_PLUGIN,
MENU_ENUM_LABEL_VALUE_AUDIO_DSP_PLUGIN,
2016-04-28 18:49:13 +00:00
settings->directory.audio_filter,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_values(list, list_info, "dsp");
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_DSP_FILTER_INIT);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_INPUT:
{
unsigned user;
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_SETTINGS_BEGIN),
2016-03-20 19:45:06 +00:00
parent_group);
2015-06-02 18:26:27 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->input.max_users,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_INPUT_MAX_USERS,
MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS,
2016-03-20 19:45:06 +00:00
input_max_users,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 1, MAX_USERS, 1, true, true);
2015-06-02 18:26:27 +00:00
2016-12-11 00:29:53 +00:00
CONFIG_BOOL(
list, list_info,
&settings->menu.unified_controls,
MENU_ENUM_LABEL_INPUT_UNIFIED_MENU_CONTROLS,
MENU_ENUM_LABEL_VALUE_INPUT_UNIFIED_MENU_CONTROLS,
false,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->input.poll_type_behavior,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_INPUT_POLL_TYPE_BEHAVIOR,
MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR,
2016-03-20 19:45:06 +00:00
input_poll_type_behavior,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 2, 1, true, true);
2016-10-14 19:57:18 +00:00
#ifdef VITA
CONFIG_BOOL(
list, list_info,
&settings->input.backtouch_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_INPUT_TOUCH_ENABLE,
MENU_ENUM_LABEL_VALUE_INPUT_TOUCH_ENABLE,
2016-10-14 19:57:18 +00:00
input_backtouch_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-10-14 19:57:18 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
CONFIG_BOOL(
list, list_info,
&settings->input.backtouch_toggle,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_INPUT_PREFER_FRONT_TOUCH,
MENU_ENUM_LABEL_VALUE_INPUT_PREFER_FRONT_TOUCH,
input_backtouch_toggle,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2016-10-14 19:57:18 +00:00
#endif
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
#if TARGET_OS_IPHONE
CONFIG_BOOL(
list, list_info,
&settings->input.keyboard_gamepad_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_INPUT_ICADE_ENABLE,
MENU_ENUM_LABEL_VALUE_INPUT_ICADE_ENABLE,
2016-03-20 19:45:06 +00:00
false,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->input.keyboard_gamepad_mapping_type,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE,
MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE,
2016-03-20 19:45:06 +00:00
1,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
CONFIG_BOOL(
list, list_info,
&settings->input.small_keyboard_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_INPUT_SMALL_KEYBOARD_ENABLE,
MENU_ENUM_LABEL_VALUE_INPUT_SMALL_KEYBOARD_ENABLE,
2016-03-20 19:45:06 +00:00
false,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2015-06-02 18:26:27 +00:00
#endif
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->input.menu_toggle_gamepad_combo,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO,
MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO,
2016-03-20 19:45:06 +00:00
menu_toggle_gamepad_combo,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 4, 1, true, true);
2015-06-02 18:26:27 +00:00
2016-11-19 18:48:24 +00:00
CONFIG_BOOL(
list, list_info,
&settings->input.menu_swap_ok_cancel_buttons,
MENU_ENUM_LABEL_MENU_INPUT_SWAP_OK_CANCEL,
MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL,
menu_swap_ok_cancel_buttons,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
CONFIG_BOOL(
list, list_info,
&settings->input.all_users_control_menu,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_INPUT_ALL_USERS_CONTROL_MENU,
MENU_ENUM_LABEL_VALUE_INPUT_ALL_USERS_CONTROL_MENU,
all_users_control_menu,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->input.remap_binds_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_INPUT_REMAP_BINDS_ENABLE,
MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE,
2016-03-20 19:45:06 +00:00
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED
);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->input.autodetect_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_INPUT_AUTODETECT_ENABLE,
MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE,
2016-03-20 19:45:06 +00:00
input_autodetect_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED
);
2015-06-02 18:26:27 +00:00
#if 0
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->input.input_descriptor_label_show,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW,
MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW,
2016-03-20 19:45:06 +00:00
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED
);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->input.input_descriptor_hide_unbound,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_INPUT_DESCRIPTOR_HIDE_UNBOUND,
MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND,
2016-03-20 19:45:06 +00:00
input_descriptor_hide_unbound,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED
);
#endif
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(
list,
list_info,
2016-11-19 14:52:12 +00:00
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_TURBO_DEADZONE_LIST),
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group);
2016-03-20 19:45:06 +00:00
CONFIG_FLOAT(
list, list_info,
&settings->input.axis_threshold,
2016-10-26 03:07:27 +00:00
MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD,
MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD,
2016-03-20 19:45:06 +00:00
axis_threshold,
"%.3f",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 1.00, 0.001, true, true);
2016-06-26 06:22:40 +00:00
CONFIG_UINT(
list, list_info,
&settings->input.bind_timeout,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_INPUT_BIND_TIMEOUT,
MENU_ENUM_LABEL_VALUE_INPUT_BIND_TIMEOUT,
2016-06-26 06:22:40 +00:00
input_bind_timeout,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 1, 0, 1, true, false);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->input.turbo_period,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_INPUT_TURBO_PERIOD,
MENU_ENUM_LABEL_VALUE_INPUT_TURBO_PERIOD,
2016-03-20 19:45:06 +00:00
turbo_period,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 1, 0, 1, true, false);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->input.turbo_duty_cycle,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_INPUT_DUTY_CYCLE,
MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE,
2016-03-20 19:45:06 +00:00
turbo_duty_cycle,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 1, 0, 1, true, false);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "Binds", &group_info, &subgroup_info, parent_group);
2016-03-20 19:45:06 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_INPUT_HOTKEY_BINDS,
MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
for (user = 0; user < MAX_USERS; user++)
{
2016-10-27 07:49:21 +00:00
static char binds_list[MAX_USERS][255];
static char binds_label[MAX_USERS][255];
2016-06-16 20:32:27 +00:00
unsigned user_value = user + 1;
2016-06-16 20:32:27 +00:00
snprintf(binds_list[user], sizeof(binds_list[user]), "%d_input_binds_list", user_value);
snprintf(binds_label[user], sizeof(binds_label[user]), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS), user_value);
2015-06-02 18:26:27 +00:00
2016-10-26 03:15:52 +00:00
CONFIG_ACTION_ALT(
2016-03-20 19:45:06 +00:00
list, list_info,
binds_list[user],
binds_label[user],
&group_info,
&subgroup_info,
parent_group);
2016-06-16 20:32:27 +00:00
(*list)[list_info->index - 1].index = user_value;
2016-03-20 19:45:06 +00:00
(*list)[list_info->index - 1].index_offset = user;
2016-06-16 20:32:27 +00:00
menu_settings_list_current_add_enum_idx(list, list_info, (enum msg_hash_enums)(MENU_ENUM_LABEL_INPUT_USER_1_BINDS + user));
2016-03-20 19:45:06 +00:00
}
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_GROUP(list, list_info, parent_group);
}
break;
case SETTINGS_LIST_RECORDING:
2016-03-20 19:46:34 +00:00
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RECORDING_SETTINGS),
2016-03-20 19:46:34 +00:00
parent_group);
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_RECORDING_SETTINGS);
2016-03-20 19:46:34 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
CONFIG_BOOL(
list, list_info,
recording_is_enabled(),
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_RECORD_ENABLE,
MENU_ENUM_LABEL_VALUE_RECORD_ENABLE,
2016-03-20 19:46:34 +00:00
false,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:46:34 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2016-03-20 19:46:34 +00:00
CONFIG_PATH(
list, list_info,
global->record.config,
sizeof(global->record.config),
2016-10-26 03:30:45 +00:00
MENU_ENUM_LABEL_RECORD_CONFIG,
MENU_ENUM_LABEL_VALUE_RECORD_CONFIG,
2016-03-20 19:46:34 +00:00
"",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_values(list, list_info, "cfg");
CONFIG_STRING(
list, list_info,
global->record.path,
sizeof(global->record.path),
2016-10-26 03:22:07 +00:00
MENU_ENUM_LABEL_RECORD_PATH,
MENU_ENUM_LABEL_VALUE_RECORD_PATH,
2016-03-20 19:46:34 +00:00
"",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
CONFIG_BOOL(
list, list_info,
2016-09-30 22:47:05 +00:00
recording_driver_get_use_output_dir_ptr(),
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_RECORD_USE_OUTPUT_DIRECTORY,
MENU_ENUM_LABEL_VALUE_RECORD_USE_OUTPUT_DIRECTORY,
2016-03-20 19:46:34 +00:00
false,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:46:34 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2016-03-20 19:46:34 +00:00
END_SUB_GROUP(list, list_info, parent_group);
START_SUB_GROUP(list, list_info, "Miscellaneous", &group_info, &subgroup_info, parent_group);
CONFIG_BOOL(
list, list_info,
&settings->video.post_filter_record,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VIDEO_POST_FILTER_RECORD,
MENU_ENUM_LABEL_VALUE_VIDEO_POST_FILTER_RECORD,
2016-03-20 19:46:34 +00:00
post_filter_record,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:46:34 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2016-03-20 19:46:34 +00:00
CONFIG_BOOL(
list, list_info,
&settings->video.gpu_record,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VIDEO_GPU_RECORD,
MENU_ENUM_LABEL_VALUE_VIDEO_GPU_RECORD,
2016-03-20 19:46:34 +00:00
gpu_record,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:46:34 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2016-03-20 19:46:34 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
2016-03-20 19:45:06 +00:00
break;
case SETTINGS_LIST_INPUT_HOTKEY:
{
unsigned i;
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_INPUT_HOTKEY_BINDS_BEGIN),
2016-03-20 19:45:06 +00:00
parent_group);
2015-06-02 18:26:27 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info,
parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
for (i = 0; i < RARCH_BIND_LIST_END; i ++)
{
if (!input_config_bind_map_get_meta(i))
continue;
2015-06-02 18:26:27 +00:00
2016-10-27 02:03:24 +00:00
CONFIG_BIND_ALT(
2016-03-20 19:45:06 +00:00
list, list_info,
&settings->input.binds[0][i], 0, 0,
strdup(input_config_bind_map_get_base(i)),
strdup(input_config_bind_map_get_desc(i)),
&retro_keybinds_1[i],
&group_info, &subgroup_info, parent_group);
(*list)[list_info->index - 1].bind_type = i + MENU_SETTINGS_BIND_BEGIN;
menu_settings_list_current_add_enum_idx(list, list_info,
2016-07-10 19:06:29 +00:00
(enum msg_hash_enums)(MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN + i));
2016-03-20 19:45:06 +00:00
}
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
}
break;
case SETTINGS_LIST_FRAME_THROTTLING:
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_SETTINGS),
2016-03-20 19:45:06 +00:00
parent_group);
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_FRAME_THROTTLE_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_FLOAT(
list, list_info,
&settings->fastforward_ratio,
2016-10-26 03:07:27 +00:00
MENU_ENUM_LABEL_FASTFORWARD_RATIO,
MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO,
2016-03-20 19:45:06 +00:00
fastforward_ratio,
"%.1fx",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_SET_FRAME_LIMIT);
2016-03-20 19:45:06 +00:00
menu_settings_list_current_add_range(list, list_info, 0, 10, 1.0, true, true);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_FLOAT(
list, list_info,
&settings->slowmotion_ratio,
2016-10-26 03:07:27 +00:00
MENU_ENUM_LABEL_SLOWMOTION_RATIO,
MENU_ENUM_LABEL_VALUE_SLOWMOTION_RATIO,
2016-03-20 19:45:06 +00:00
slowmotion_ratio,
"%.1fx",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 1, 10, 1.0, true, true);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->menu.throttle_framerate,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_MENU_THROTTLE_FRAMERATE,
MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE,
2016-03-20 19:45:06 +00:00
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED
);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_FONT:
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ONSCREEN_DISPLAY_SETTINGS),
2016-03-20 19:45:06 +00:00
parent_group);
2015-06-02 18:26:27 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_ONSCREEN_DISPLAY_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "Messages",
&group_info,
&subgroup_info,
parent_group);
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->video.font_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VIDEO_FONT_ENABLE,
MENU_ENUM_LABEL_VALUE_VIDEO_FONT_ENABLE,
2016-03-20 19:45:06 +00:00
font_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_PATH(
list, list_info,
2016-04-28 17:52:25 +00:00
settings->path.font,
sizeof(settings->path.font),
2016-10-26 03:30:45 +00:00
MENU_ENUM_LABEL_VIDEO_FONT_PATH,
MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH,
2016-03-20 19:45:06 +00:00
"",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_FLOAT(
list, list_info,
&settings->video.font_size,
2016-10-26 03:07:27 +00:00
MENU_ENUM_LABEL_VIDEO_FONT_SIZE,
MENU_ENUM_LABEL_VALUE_VIDEO_FONT_SIZE,
2016-03-20 19:45:06 +00:00
font_size,
"%.1f",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 1.00, 100.00, 1.0, true, true);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_FLOAT(
list, list_info,
&settings->video.msg_pos_x,
2016-10-26 03:07:27 +00:00
MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_X,
MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_POS_X,
2016-03-20 19:45:06 +00:00
message_pos_offset_x,
"%.3f",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 1, 0.01, true, true);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_FLOAT(
list, list_info,
&settings->video.msg_pos_y,
2016-10-26 03:07:27 +00:00
MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_Y,
MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_POS_Y,
2016-03-20 19:45:06 +00:00
message_pos_offset_y,
"%.3f",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 1, 0.01, true, true);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_OVERLAY:
#ifdef HAVE_OVERLAY
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OVERLAY_SETTINGS),
2016-03-20 19:45:06 +00:00
parent_group);
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_OVERLAY_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->input.overlay_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_INPUT_OVERLAY_ENABLE,
MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_ENABLE,
2016-08-01 12:14:21 +00:00
config_overlay_enable_default(),
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2016-03-20 19:45:06 +00:00
(*list)[list_info->index - 1].change_handler = overlay_enable_toggle_change_handler;
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->input.overlay_enable_autopreferred,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_OVERLAY_AUTOLOAD_PREFERRED,
MENU_ENUM_LABEL_VALUE_OVERLAY_AUTOLOAD_PREFERRED,
2016-03-20 19:45:06 +00:00
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2016-03-20 19:45:06 +00:00
(*list)[list_info->index - 1].change_handler = overlay_enable_toggle_change_handler;
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->input.overlay_hide_in_menu,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_INPUT_OVERLAY_HIDE_IN_MENU,
MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_HIDE_IN_MENU,
2016-03-20 19:45:06 +00:00
overlay_hide_in_menu,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2016-03-20 19:45:06 +00:00
(*list)[list_info->index - 1].change_handler = overlay_enable_toggle_change_handler;
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_PATH(
list, list_info,
2016-04-28 18:49:13 +00:00
settings->path.overlay,
sizeof(settings->path.overlay),
2016-10-26 03:30:45 +00:00
MENU_ENUM_LABEL_OVERLAY_PRESET,
MENU_ENUM_LABEL_VALUE_OVERLAY_PRESET,
2016-04-28 17:26:02 +00:00
settings->directory.overlay,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_values(list, list_info, "cfg");
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_OVERLAY_INIT);
2015-06-04 12:39:40 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_FLOAT(
list, list_info,
&settings->input.overlay_opacity,
2016-10-26 03:07:27 +00:00
MENU_ENUM_LABEL_OVERLAY_OPACITY,
MENU_ENUM_LABEL_VALUE_OVERLAY_OPACITY,
2016-03-20 19:45:06 +00:00
0.7f,
"%.2f",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_OVERLAY_SET_ALPHA_MOD);
2016-03-20 19:45:06 +00:00
menu_settings_list_current_add_range(list, list_info, 0, 1, 0.01, true, true);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
2016-03-20 19:45:06 +00:00
CONFIG_FLOAT(
list, list_info,
&settings->input.overlay_scale,
2016-10-26 03:07:27 +00:00
MENU_ENUM_LABEL_OVERLAY_SCALE,
MENU_ENUM_LABEL_VALUE_OVERLAY_SCALE,
2016-03-20 19:45:06 +00:00
1.0f,
"%.2f",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_OVERLAY_SET_SCALE_FACTOR);
2016-03-20 19:45:06 +00:00
menu_settings_list_current_add_range(list, list_info, 0, 2, 0.01, true, true);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
2015-06-04 12:39:40 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "Onscreen Keyboard Overlay", &group_info, &subgroup_info, parent_group);
2015-06-04 12:39:40 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
#endif
break;
case SETTINGS_LIST_MENU:
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS),
2016-03-20 19:45:06 +00:00
parent_group);
2016-06-17 00:52:08 +00:00
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_MENU_SETTINGS);
2015-06-04 12:39:40 +00:00
2016-07-02 18:40:27 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_MENU_SETTINGS);
2015-06-04 12:39:40 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
if (!string_is_equal(settings->menu.driver, "rgui"))
{
CONFIG_PATH(
list, list_info,
settings->path.menu_wallpaper,
sizeof(settings->path.menu_wallpaper),
2016-10-26 03:30:45 +00:00
MENU_ENUM_LABEL_MENU_WALLPAPER,
MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER,
"",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_values(list, list_info, "png");
2015-06-02 18:26:27 +00:00
CONFIG_FLOAT(
list, list_info,
&settings->menu.wallpaper.opacity,
2016-10-26 03:07:27 +00:00
MENU_ENUM_LABEL_MENU_WALLPAPER_OPACITY,
MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY,
menu_wallpaper_opacity,
"%.3f",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0.0, 1.0, 0.010, true, true);
}
2016-07-09 13:13:06 +00:00
if (string_is_equal(settings->menu.driver, "xmb"))
{
CONFIG_BOOL(
list, list_info,
&settings->menu.dynamic_wallpaper_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_DYNAMIC_WALLPAPER,
MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPER,
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
}
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->menu.pause_libretro,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_PAUSE_LIBRETRO,
MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO,
2016-03-20 19:45:06 +00:00
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_CMD_APPLY_AUTO
);
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_MENU_PAUSE_LIBRETRO);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->menu.mouse.enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_MOUSE_ENABLE,
MENU_ENUM_LABEL_VALUE_MOUSE_ENABLE,
2016-03-20 19:45:06 +00:00
def_mouse_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED
);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->menu.pointer.enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_POINTER_ENABLE,
MENU_ENUM_LABEL_VALUE_POINTER_ENABLE,
2016-03-20 19:45:06 +00:00
pointer_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED
);
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->menu.linear_filter,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_MENU_LINEAR_FILTER,
MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
2016-03-20 19:45:06 +00:00
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED
);
2016-03-20 19:45:06 +00:00
#ifdef RARCH_MOBILE
/* We don't want mobile users being able to switch this off. */
(*list)[list_info->index - 1].action_left = NULL;
(*list)[list_info->index - 1].action_right = NULL;
(*list)[list_info->index - 1].action_start = NULL;
#endif
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "Navigation", &group_info, &subgroup_info, parent_group);
2015-07-09 04:27:17 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->menu.navigation.wraparound.enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_NAVIGATION_WRAPAROUND,
MENU_ENUM_LABEL_VALUE_NAVIGATION_WRAPAROUND,
2016-03-20 19:45:06 +00:00
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED
);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
START_SUB_GROUP(list, list_info, "Settings View", &group_info, &subgroup_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->menu.show_advanced_settings,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_SHOW_ADVANCED_SETTINGS,
MENU_ENUM_LABEL_VALUE_SHOW_ADVANCED_SETTINGS,
2016-03-20 19:45:06 +00:00
show_advanced_settings,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
#ifdef HAVE_THREADS
CONFIG_BOOL(
list, list_info,
&settings->threaded_data_runloop_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_THREADED_DATA_RUNLOOP_ENABLE,
MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE,
2016-03-20 19:45:06 +00:00
threaded_data_runloop_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED
);
2016-03-20 19:45:06 +00:00
#endif
2015-06-02 18:26:27 +00:00
#if 0
2016-03-20 19:45:06 +00:00
/* These colors are hints. The menu driver is not required to use them. */
CONFIG_HEX(
list, list_info,
&settings->menu.entry_normal_color,
2016-10-26 03:42:24 +00:00
MENU_ENUM_LABEL_ENTRY_NORMAL_COLOR,
MENU_ENUM_LABEL_VALUE_ENTRY_NORMAL_COLOR,
2016-03-20 19:45:06 +00:00
menu_entry_normal_color,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
2015-10-30 13:36:04 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_HEX(
list, list_info,
&settings->menu.entry_hover_color,
2016-10-26 03:42:24 +00:00
MENU_ENUM_LABEL_ENTRY_HOVER_COLOR,
MENU_ENUM_LABEL_VALUE_ENTRY_HOVER_COLOR,
2016-03-20 19:45:06 +00:00
menu_entry_hover_color,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_HEX(
list, list_info,
&settings->menu.title_color,
2016-10-26 03:42:24 +00:00
MENU_ENUM_LABEL_TITLE_COLOR,
MENU_ENUM_LABEL_VALUE_TITLE_COLOR,
2016-03-20 19:45:06 +00:00
menu_title_color,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
#endif
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "Display", &group_info, &subgroup_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-06-14 22:52:15 +00:00
/* only GLUI uses these values, don't show them on other drivers */
2016-03-20 19:45:06 +00:00
if (string_is_equal(settings->menu.driver, "glui"))
{
CONFIG_BOOL(
list, list_info,
&settings->menu.dpi.override_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_DPI_OVERRIDE_ENABLE,
MENU_ENUM_LABEL_VALUE_DPI_OVERRIDE_ENABLE,
2016-03-20 19:45:06 +00:00
menu_dpi_override_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->menu.dpi.override_value,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_DPI_OVERRIDE_VALUE,
MENU_ENUM_LABEL_VALUE_DPI_OVERRIDE_VALUE,
2016-03-20 19:45:06 +00:00
menu_dpi_override_value,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 72, 999, 1, true, true);
}
2016-06-14 22:52:15 +00:00
2016-07-24 09:32:45 +00:00
#ifdef HAVE_XMB
2016-03-20 19:45:06 +00:00
/* only XMB uses these values, don't show them on other drivers */
if (string_is_equal(settings->menu.driver, "xmb"))
{
CONFIG_UINT(
list, list_info,
2016-07-09 11:05:58 +00:00
&settings->menu.xmb.alpha_factor,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_XMB_ALPHA_FACTOR,
MENU_ENUM_LABEL_VALUE_XMB_ALPHA_FACTOR,
2016-03-20 19:45:06 +00:00
xmb_alpha_factor,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 100, 1, true, true);
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
2016-07-09 11:05:58 +00:00
&settings->menu.xmb.scale_factor,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_XMB_SCALE_FACTOR,
MENU_ENUM_LABEL_VALUE_XMB_SCALE_FACTOR,
2016-03-20 19:45:06 +00:00
xmb_scale_factor,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 100, 1, true, true);
2016-03-20 19:45:06 +00:00
CONFIG_PATH(
list, list_info,
2016-07-09 11:05:58 +00:00
settings->menu.xmb.font,
sizeof(settings->menu.xmb.font),
2016-10-26 03:30:45 +00:00
MENU_ENUM_LABEL_XMB_FONT,
MENU_ENUM_LABEL_VALUE_XMB_FONT,
2016-07-09 11:05:58 +00:00
settings->menu.xmb.font,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2016-03-21 19:54:16 +00:00
CONFIG_UINT(
list, list_info,
2016-07-09 11:05:58 +00:00
&settings->menu.xmb.theme,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_XMB_THEME,
MENU_ENUM_LABEL_VALUE_XMB_THEME,
xmb_icon_theme,
2016-03-21 19:54:16 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2017-02-01 23:01:15 +00:00
menu_settings_list_current_add_range(list, list_info, 0, XMB_ICON_THEME_LAST - 1, 1, true, true);
2016-04-07 17:24:55 +00:00
CONFIG_BOOL(
list, list_info,
2016-07-09 11:05:58 +00:00
&settings->menu.xmb.shadows_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_XMB_SHADOWS_ENABLE,
MENU_ENUM_LABEL_VALUE_XMB_SHADOWS_ENABLE,
xmb_shadows_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-04-22 05:32:32 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
2016-04-22 05:32:32 +00:00
2016-06-06 22:00:28 +00:00
#ifdef HAVE_SHADERPIPELINE
CONFIG_UINT(
2016-04-22 05:32:32 +00:00
list, list_info,
2016-07-09 11:05:58 +00:00
&settings->menu.xmb.shader_pipeline,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_XMB_RIBBON_ENABLE,
MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE,
menu_shader_pipeline,
2016-04-07 17:24:55 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2016-07-14 16:40:57 +00:00
menu_settings_list_current_add_range(list, list_info, 0, XMB_SHADER_PIPELINE_LAST-1, 1, true, true);
2016-06-06 22:00:28 +00:00
#endif
2016-04-22 06:47:14 +00:00
CONFIG_UINT(
list, list_info,
2016-07-09 11:05:58 +00:00
&settings->menu.xmb.menu_color_theme,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_XMB_MENU_COLOR_THEME,
MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME,
2016-09-06 17:50:13 +00:00
xmb_theme,
2016-04-22 06:47:14 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, XMB_THEME_LAST-1, 1, true, true);
2016-08-18 14:42:39 +00:00
CONFIG_BOOL(
list, list_info,
&settings->menu.xmb.show_settings,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_XMB_SHOW_SETTINGS,
MENU_ENUM_LABEL_VALUE_XMB_SHOW_SETTINGS,
2016-08-18 14:42:39 +00:00
xmb_show_settings,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-08-18 14:42:39 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
#ifdef HAVE_IMAGEVIEWER
CONFIG_BOOL(
list, list_info,
&settings->menu.xmb.show_images,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_XMB_SHOW_IMAGES,
MENU_ENUM_LABEL_VALUE_XMB_SHOW_IMAGES,
2016-08-18 14:42:39 +00:00
xmb_show_images,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-08-18 14:42:39 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
#endif
#ifdef HAVE_FFMPEG
CONFIG_BOOL(
list, list_info,
&settings->menu.xmb.show_music,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_XMB_SHOW_MUSIC,
MENU_ENUM_LABEL_VALUE_XMB_SHOW_MUSIC,
2016-08-18 14:42:39 +00:00
xmb_show_music,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-08-18 14:42:39 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->menu.xmb.show_video,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_XMB_SHOW_VIDEO,
MENU_ENUM_LABEL_VALUE_XMB_SHOW_VIDEO,
2016-08-18 14:42:39 +00:00
xmb_show_video,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-08-18 14:42:39 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
#endif
CONFIG_BOOL(
list, list_info,
&settings->menu.xmb.show_history,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_XMB_SHOW_HISTORY,
MENU_ENUM_LABEL_VALUE_XMB_SHOW_HISTORY,
2016-08-18 14:42:39 +00:00
xmb_show_history,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-08-18 14:42:39 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
#ifdef HAVE_LIBRETRODB
CONFIG_BOOL(
list, list_info,
&settings->menu.xmb.show_add,
MENU_ENUM_LABEL_XMB_SHOW_ADD,
MENU_ENUM_LABEL_VALUE_XMB_SHOW_ADD,
xmb_show_add,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
#endif
}
2016-08-18 14:42:39 +00:00
2016-07-24 09:32:45 +00:00
#endif
2016-07-24 09:32:45 +00:00
#ifdef HAVE_MATERIALUI
/* only MaterialUI uses these values, don't show them on other drivers */
if (string_is_equal(settings->menu.driver, "glui"))
{
CONFIG_UINT(
list, list_info,
&settings->menu.materialui.menu_color_theme,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME,
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME,
2016-07-10 22:47:25 +00:00
MATERIALUI_THEME_BLUE,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, MATERIALUI_THEME_LAST-1, 1, true, true);
2016-07-11 15:27:36 +00:00
2016-07-11 15:41:06 +00:00
CONFIG_FLOAT(
list, list_info,
&settings->menu.header.opacity,
2016-10-26 03:07:27 +00:00
MENU_ENUM_LABEL_MATERIALUI_MENU_HEADER_OPACITY,
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_HEADER_OPACITY,
2016-07-11 15:41:06 +00:00
menu_header_opacity,
2016-07-16 17:09:38 +00:00
"%.3f",
2016-07-11 15:41:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0.0, 1.0, 0.010, true, true);
2016-07-11 15:27:36 +00:00
CONFIG_FLOAT(
list, list_info,
&settings->menu.footer.opacity,
2016-10-26 03:07:27 +00:00
MENU_ENUM_LABEL_MATERIALUI_MENU_FOOTER_OPACITY,
MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_FOOTER_OPACITY,
2016-07-11 15:27:36 +00:00
menu_footer_opacity,
2016-07-16 17:09:38 +00:00
"%.3f",
2016-07-11 15:27:36 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0.0, 1.0, 0.010, true, true);
2016-03-20 19:45:06 +00:00
}
2016-07-24 09:32:45 +00:00
#endif
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->menu_show_start_screen,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_RGUI_SHOW_START_SCREEN,
MENU_ENUM_LABEL_VALUE_RGUI_SHOW_START_SCREEN,
2016-03-20 19:45:06 +00:00
default_menu_show_start_screen,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED);
if (string_is_equal(settings->menu.driver, "xmb"))
{
CONFIG_UINT(
list, list_info,
&settings->menu.thumbnails,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_THUMBNAILS,
MENU_ENUM_LABEL_VALUE_THUMBNAILS,
menu_thumbnails_default,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
}
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->menu.timedate_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_TIMEDATE_ENABLE,
MENU_ENUM_LABEL_VALUE_TIMEDATE_ENABLE,
2016-03-20 19:45:06 +00:00
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED);
CONFIG_BOOL(
list, list_info,
&settings->menu.battery_level_enable,
MENU_ENUM_LABEL_BATTERY_LEVEL_ENABLE,
MENU_ENUM_LABEL_VALUE_BATTERY_LEVEL_ENABLE,
true,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED);
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->menu.core_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_CORE_ENABLE,
MENU_ENUM_LABEL_VALUE_CORE_ENABLE,
2016-03-20 19:45:06 +00:00
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED);
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_MENU_FILE_BROWSER:
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS),
2016-03-20 19:45:06 +00:00
parent_group);
2015-06-02 18:26:27 +00:00
2016-07-02 18:40:27 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_MENU_FILE_BROWSER_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->menu.navigation.browser.filter.supported_extensions_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE,
MENU_ENUM_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE,
2016-03-20 19:45:06 +00:00
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_MULTIMEDIA:
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MULTIMEDIA_SETTINGS),
2016-03-20 19:45:06 +00:00
parent_group);
2015-06-02 18:26:27 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
2016-03-20 19:45:06 +00:00
if (!string_is_equal(settings->record.driver, "null"))
2016-06-14 22:52:15 +00:00
{
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->multimedia.builtin_mediaplayer_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_USE_BUILTIN_PLAYER,
MENU_ENUM_LABEL_VALUE_USE_BUILTIN_PLAYER,
2016-03-20 19:45:06 +00:00
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
2016-06-14 22:52:15 +00:00
}
2015-07-09 02:05:59 +00:00
2016-03-20 19:45:06 +00:00
#ifdef HAVE_IMAGEVIEWER
CONFIG_BOOL(
list, list_info,
&settings->multimedia.builtin_imageviewer_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_USE_BUILTIN_IMAGE_VIEWER,
MENU_ENUM_LABEL_VALUE_USE_BUILTIN_IMAGE_VIEWER,
2016-03-20 19:45:06 +00:00
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
2016-03-20 19:45:06 +00:00
#endif
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_USER_INTERFACE:
START_GROUP(list, list_info, &group_info,
2016-07-02 18:40:27 +00:00
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER_INTERFACE_SETTINGS),
2016-03-20 19:45:06 +00:00
parent_group);
2015-06-02 18:26:27 +00:00
2016-07-02 18:40:27 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_USER_INTERFACE_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->pause_nonactive,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_PAUSE_NONACTIVE,
MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE,
pause_nonactive,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
2015-06-02 18:26:27 +00:00
#if !defined(RARCH_MOBILE)
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->video.disable_composition,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VIDEO_DISABLE_COMPOSITION,
MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION,
disable_composition,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_CMD_APPLY_AUTO);
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_REINIT);
#endif
2015-06-02 18:26:27 +00:00
if (!string_is_equal(ui_companion_driver_get_ident(), "null"))
{
CONFIG_BOOL(
list, list_info,
&settings->ui.companion_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_UI_COMPANION_ENABLE,
MENU_ENUM_LABEL_VALUE_UI_COMPANION_ENABLE,
ui_companion_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED);
2015-06-02 18:26:27 +00:00
CONFIG_BOOL(
list, list_info,
&settings->ui.companion_start_on_boot,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_UI_COMPANION_START_ON_BOOT,
MENU_ENUM_LABEL_VALUE_UI_COMPANION_START_ON_BOOT,
ui_companion_start_on_boot,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED);
2015-06-02 18:26:27 +00:00
CONFIG_BOOL(
list, list_info,
&settings->ui.menubar_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_UI_MENUBAR_ENABLE,
MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE,
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
}
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_PLAYLIST:
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLIST_SETTINGS_BEGIN),
2016-03-20 19:45:06 +00:00
parent_group);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
2015-06-02 18:26:27 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "History", &group_info, &subgroup_info, parent_group);
2015-06-04 10:17:23 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->history_list_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_HISTORY_LIST_ENABLE,
MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE,
2016-03-20 19:45:06 +00:00
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED
);
2015-06-18 02:32:56 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->content_history_size,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE,
MENU_ENUM_LABEL_VALUE_CONTENT_HISTORY_SIZE,
2016-03-20 19:45:06 +00:00
default_content_history_size,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 0, 1.0, true, false);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
START_SUB_GROUP(list, list_info, "Playlist", &group_info, &subgroup_info, parent_group);
CONFIG_BOOL(
list, list_info,
&settings->playlist_entry_remove,
MENU_ENUM_LABEL_PLAYLIST_ENTRY_REMOVE,
MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE,
def_playlist_entry_remove,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
END_SUB_GROUP(list, list_info, parent_group);
2016-03-20 19:45:06 +00:00
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_CHEEVOS:
#ifdef HAVE_CHEEVOS
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEEVOS_SETTINGS),
2016-03-20 19:45:06 +00:00
parent_group);
2016-07-02 18:40:27 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_RETRO_ACHIEVEMENTS_SETTINGS);
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->cheevos.enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_CHEEVOS_ENABLE,
MENU_ENUM_LABEL_VALUE_CHEEVOS_ENABLE,
2016-07-25 05:33:41 +00:00
cheevos_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2016-02-27 23:30:12 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->cheevos.test_unofficial,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_CHEEVOS_TEST_UNOFFICIAL,
MENU_ENUM_LABEL_VALUE_CHEEVOS_TEST_UNOFFICIAL,
2016-03-20 19:45:06 +00:00
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED
);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->cheevos.hardcore_mode_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_CHEEVOS_HARDCORE_MODE_ENABLE,
MENU_ENUM_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE,
2016-03-20 19:45:06 +00:00
false,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_CHEEVOS_HARDCORE_MODE_TOGGLE);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
#endif
break;
case SETTINGS_LIST_CORE_UPDATER:
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_UPDATER_SETTINGS),
2016-03-20 19:45:06 +00:00
parent_group);
2016-07-02 18:40:27 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_UPDATER_SETTINGS);
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
2016-09-10 17:06:00 +00:00
#ifdef HAVE_NETWORKING
2016-03-20 19:45:06 +00:00
CONFIG_STRING(
list, list_info,
settings->network.buildbot_url,
sizeof(settings->network.buildbot_url),
2016-10-26 03:22:07 +00:00
MENU_ENUM_LABEL_CORE_UPDATER_BUILDBOT_URL,
MENU_ENUM_LABEL_VALUE_CORE_UPDATER_BUILDBOT_URL,
buildbot_server_url,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_STRING(
list, list_info,
settings->network.buildbot_assets_url,
sizeof(settings->network.buildbot_assets_url),
2016-10-26 03:22:07 +00:00
MENU_ENUM_LABEL_BUILDBOT_ASSETS_URL,
MENU_ENUM_LABEL_VALUE_BUILDBOT_ASSETS_URL,
buildbot_assets_server_url,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->network.buildbot_auto_extract_archive,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE,
MENU_ENUM_LABEL_VALUE_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE,
2016-03-20 19:45:06 +00:00
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE
);
2016-09-10 17:06:00 +00:00
#endif
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_NETPLAY:
2016-09-10 17:06:00 +00:00
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETWORK_SETTINGS),
parent_group);
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_NETWORK_SETTINGS);
START_SUB_GROUP(list, list_info, "Netplay", &group_info, &subgroup_info, parent_group);
2016-03-20 19:45:06 +00:00
{
2016-09-29 19:07:10 +00:00
#if defined(HAVE_NETWORKING)
2016-03-20 19:45:06 +00:00
#if defined(HAVE_NETWORK_CMD)
unsigned user;
#endif
CONFIG_BOOL(
list, list_info,
&settings->netplay.public_announce,
MENU_ENUM_LABEL_NETPLAY_PUBLIC_ANNOUNCE,
MENU_ENUM_LABEL_VALUE_NETPLAY_PUBLIC_ANNOUNCE,
true,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
2016-03-20 19:45:06 +00:00
CONFIG_STRING(
list, list_info,
settings->netplay.server,
sizeof(settings->netplay.server),
2016-10-26 03:22:07 +00:00
MENU_ENUM_LABEL_NETPLAY_IP_ADDRESS,
MENU_ENUM_LABEL_VALUE_NETPLAY_IP_ADDRESS,
2016-03-20 19:45:06 +00:00
"",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
2015-06-02 18:26:27 +00:00
CONFIG_UINT(
2016-03-20 19:45:06 +00:00
list, list_info,
&settings->netplay.port,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_NETPLAY_TCP_UDP_PORT,
MENU_ENUM_LABEL_VALUE_NETPLAY_TCP_UDP_PORT,
RARCH_DEFAULT_PORT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 65535, 1, true, true);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
2016-02-08 05:34:13 +00:00
2016-12-14 03:03:10 +00:00
CONFIG_STRING(
list, list_info,
settings->netplay.password,
sizeof(settings->netplay.password),
MENU_ENUM_LABEL_NETPLAY_PASSWORD,
MENU_ENUM_LABEL_VALUE_NETPLAY_PASSWORD,
"",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
2016-12-15 03:25:46 +00:00
CONFIG_STRING(
list, list_info,
settings->netplay.spectate_password,
sizeof(settings->netplay.spectate_password),
MENU_ENUM_LABEL_NETPLAY_SPECTATE_PASSWORD,
MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD,
"",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
CONFIG_BOOL(
list, list_info,
&settings->netplay.start_as_spectator,
MENU_ENUM_LABEL_NETPLAY_START_AS_SPECTATOR,
MENU_ENUM_LABEL_VALUE_NETPLAY_START_AS_SPECTATOR,
false,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
2016-03-20 19:45:06 +00:00
list, list_info,
&settings->netplay.stateless_mode,
MENU_ENUM_LABEL_NETPLAY_STATELESS_MODE,
MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE,
false,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
2016-02-08 06:08:03 +00:00
CONFIG_INT(
list, list_info,
&settings->netplay.check_frames,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_NETPLAY_CHECK_FRAMES,
MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES,
netplay_check_frames,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2017-01-19 18:27:52 +00:00
menu_settings_list_current_add_range(list, list_info, -600, 600, 1, false, false);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
CONFIG_INT(
list, list_info,
(int *) &settings->netplay.input_latency_frames_min,
MENU_ENUM_LABEL_NETPLAY_INPUT_LATENCY_FRAMES_MIN,
MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_MIN,
0,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 15, 1, true, true);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
CONFIG_INT(
list, list_info,
(int *) &settings->netplay.input_latency_frames_range,
MENU_ENUM_LABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE,
MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_RANGE,
0,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(list, list_info, 0, 15, 1, true, true);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
CONFIG_BOOL(
list, list_info,
2016-12-02 21:36:46 +00:00
&settings->netplay.nat_traversal,
MENU_ENUM_LABEL_NETPLAY_NAT_TRAVERSAL,
MENU_ENUM_LABEL_VALUE_NETPLAY_NAT_TRAVERSAL,
false,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
CONFIG_BOOL(
list, list_info,
&settings->netplay.swap_input,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_NETPLAY_CLIENT_SWAP_INPUT,
MENU_ENUM_LABEL_VALUE_NETPLAY_CLIENT_SWAP_INPUT,
netplay_client_swap_input,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
START_SUB_GROUP(
list,
list_info,
"Miscellaneous",
&group_info,
&subgroup_info,
parent_group);
2015-06-22 01:07:32 +00:00
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
#if defined(HAVE_NETWORK_CMD)
CONFIG_BOOL(
list, list_info,
&settings->network_cmd_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_NETWORK_CMD_ENABLE,
MENU_ENUM_LABEL_VALUE_NETWORK_CMD_ENABLE,
2016-03-20 19:45:06 +00:00
network_cmd_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED);
2015-06-20 17:46:13 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->network_cmd_port,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_NETWORK_CMD_PORT,
MENU_ENUM_LABEL_VALUE_NETWORK_CMD_PORT,
2016-03-20 19:45:06 +00:00
network_cmd_port,
&group_info,
&subgroup_info,
parent_group,
NULL,
NULL);
menu_settings_list_current_add_range(list, list_info, 1, 99999, 1, true, true);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->network_remote_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_NETWORK_REMOTE_ENABLE,
MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE,
2016-09-23 14:08:12 +00:00
false,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->network_remote_base_port,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_NETWORK_REMOTE_PORT,
MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT,
2016-03-20 19:45:06 +00:00
network_remote_base_port,
&group_info,
&subgroup_info,
parent_group,
NULL,
NULL);
menu_settings_list_current_add_range(list, list_info, 1, 99999, 1, true, true);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
2016-06-14 22:52:15 +00:00
/* TODO/FIXME - add enum_idx */
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
for(user = 0; user < settings->input.max_users; user++)
{
char s1[64], s2[64];
2015-06-02 18:26:27 +00:00
snprintf(s1, sizeof(s1), "%s_user_p%d", msg_hash_to_str(MENU_ENUM_LABEL_NETWORK_REMOTE_ENABLE), user + 1);
snprintf(s2, sizeof(s2), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETWORK_USER_REMOTE_ENABLE), user + 1);
2016-10-26 03:04:24 +00:00
CONFIG_BOOL_ALT(
2016-03-20 19:45:06 +00:00
list, list_info,
&settings->network_remote_enable_user[user],
/* todo: figure out this value, it's working fine but I don't think this is correct */
strdup(s1),
strdup(s2),
2016-09-23 14:08:12 +00:00
false,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED);
settings_data_list_current_add_free_flags(list, list_info, SD_FREE_FLAG_NAME | SD_FREE_FLAG_SHORT);
2016-07-14 00:40:51 +00:00
menu_settings_list_current_add_enum_idx(list, list_info, (enum msg_hash_enums)(MENU_ENUM_LABEL_NETWORK_REMOTE_USER_1_ENABLE + user));
2016-03-20 19:45:06 +00:00
}
2016-03-20 19:45:06 +00:00
CONFIG_BOOL(
list, list_info,
&settings->stdin_cmd_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_STDIN_CMD_ENABLE,
MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE,
2016-03-20 19:45:06 +00:00
stdin_cmd_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_ADVANCED);
2015-06-28 16:55:00 +00:00
#endif
#endif
}
2016-09-10 17:06:00 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_LAKKA_SERVICES:
{
#if defined(HAVE_LAKKA)
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LAKKA_SERVICES),
parent_group);
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS);
2016-06-30 15:53:54 +00:00
START_SUB_GROUP(list, list_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LAKKA_SERVICES),
&group_info, &subgroup_info, parent_group);
CONFIG_BOOL(
list, list_info,
&settings->ssh_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_SSH_ENABLE,
MENU_ENUM_LABEL_VALUE_SSH_ENABLE,
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
(*list)[list_info->index - 1].change_handler = ssh_enable_toggle_change_handler;
CONFIG_BOOL(
list, list_info,
&settings->samba_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_SAMBA_ENABLE,
MENU_ENUM_LABEL_VALUE_SAMBA_ENABLE,
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
(*list)[list_info->index - 1].change_handler = samba_enable_toggle_change_handler;
2016-03-23 13:06:53 +00:00
CONFIG_BOOL(
list, list_info,
&settings->bluetooth_enable,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_BLUETOOTH_ENABLE,
MENU_ENUM_LABEL_VALUE_BLUETOOTH_ENABLE,
2016-03-23 13:06:53 +00:00
true,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-23 13:06:53 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
2016-03-23 13:06:53 +00:00
(*list)[list_info->index - 1].change_handler = bluetooth_enable_toggle_change_handler;
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
2015-06-30 13:45:10 +00:00
#endif
2016-03-20 19:45:06 +00:00
}
break;
case SETTINGS_LIST_USER:
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER_SETTINGS),
2016-03-20 19:45:06 +00:00
parent_group);
2016-07-02 18:40:27 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_USER_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
2016-03-20 19:45:06 +00:00
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_ACCOUNTS_LIST,
MENU_ENUM_LABEL_VALUE_ACCOUNTS_LIST,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group);
2016-03-20 19:45:06 +00:00
CONFIG_STRING(
list, list_info,
settings->username,
sizeof(settings->username),
2016-10-26 03:22:07 +00:00
MENU_ENUM_LABEL_NETPLAY_NICKNAME,
MENU_ENUM_LABEL_VALUE_NETPLAY_NICKNAME,
2016-03-20 19:45:06 +00:00
"",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
2015-06-02 18:26:27 +00:00
2016-12-26 05:39:12 +00:00
CONFIG_STRING(
list, list_info,
settings->browse_url,
sizeof(settings->browse_url),
MENU_ENUM_LABEL_BROWSE_URL,
MENU_ENUM_LABEL_VALUE_BROWSE_URL,
"",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
2016-06-07 04:05:41 +00:00
#ifdef HAVE_LANGEXTRA
2016-03-20 19:45:06 +00:00
CONFIG_UINT(
list, list_info,
&settings->user_language,
2016-10-26 03:38:25 +00:00
MENU_ENUM_LABEL_USER_LANGUAGE,
MENU_ENUM_LABEL_VALUE_USER_LANGUAGE,
2016-03-20 19:45:06 +00:00
def_user_language,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
menu_settings_list_current_add_range(
list,
list_info,
0,
RETRO_LANGUAGE_LAST-1,
1,
true,
true);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_MENU_REFRESH);
(*list)[list_info->index - 1].get_string_representation =
2016-03-20 19:45:06 +00:00
&setting_get_string_representation_uint_user_language;
2016-06-07 04:05:41 +00:00
#endif
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_USER_ACCOUNTS:
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACCOUNTS_LIST_END),
2016-03-20 19:45:06 +00:00
parent_group);
2016-01-18 20:35:09 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
#ifdef HAVE_CHEEVOS
CONFIG_ACTION(
list, list_info,
2016-10-26 03:15:52 +00:00
MENU_ENUM_LABEL_ACCOUNTS_RETRO_ACHIEVEMENTS,
MENU_ENUM_LABEL_VALUE_ACCOUNTS_RETRO_ACHIEVEMENTS,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group);
#endif
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_USER_ACCOUNTS_CHEEVOS:
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_SETTINGS),
2016-03-20 19:45:06 +00:00
parent_group);
2015-06-02 18:26:27 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-21 03:40:49 +00:00
#ifdef HAVE_CHEEVOS
2016-03-20 19:45:06 +00:00
CONFIG_STRING(
list, list_info,
settings->cheevos.username,
sizeof(settings->cheevos.username),
2016-10-26 03:22:07 +00:00
MENU_ENUM_LABEL_CHEEVOS_USERNAME,
MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_USERNAME,
2016-03-20 19:45:06 +00:00
"",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
2016-03-20 19:45:06 +00:00
CONFIG_STRING(
list, list_info,
settings->cheevos.password,
sizeof(settings->cheevos.password),
2016-10-26 03:22:07 +00:00
MENU_ENUM_LABEL_CHEEVOS_PASSWORD,
MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_PASSWORD,
2016-03-20 19:45:06 +00:00
"",
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
(*list)[list_info->index - 1].get_string_representation =
&setting_get_string_representation_cheevos_password;
2016-03-20 19:45:06 +00:00
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
2016-03-21 03:40:49 +00:00
#endif
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_DIRECTORY:
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS),
2016-03-20 19:45:06 +00:00
parent_group);
2016-06-17 13:17:20 +00:00
menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_DIRECTORY_SETTINGS);
2015-06-02 18:26:27 +00:00
2016-07-02 18:40:27 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_DIRECTORY_SETTINGS);
2015-06-22 01:07:32 +00:00
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 17:26:02 +00:00
settings->directory.system,
sizeof(settings->directory.system),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_SYSTEM_DIRECTORY,
MENU_ENUM_LABEL_VALUE_SYSTEM_DIRECTORY,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_CONTENT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 17:26:02 +00:00
settings->directory.core_assets,
sizeof(settings->directory.core_assets),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_CORE_ASSETS_DIRECTORY,
MENU_ENUM_LABEL_VALUE_CORE_ASSETS_DIRECTORY,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-10-18 05:05:15 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 17:26:02 +00:00
settings->directory.assets,
sizeof(settings->directory.assets),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_ASSETS_DIRECTORY,
MENU_ENUM_LABEL_VALUE_ASSETS_DIRECTORY,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-10-18 05:05:15 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 17:26:02 +00:00
settings->directory.dynamic_wallpapers,
sizeof(settings->directory.dynamic_wallpapers),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_DYNAMIC_WALLPAPERS_DIRECTORY,
MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 17:26:02 +00:00
settings->directory.thumbnails,
sizeof(settings->directory.thumbnails),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_THUMBNAILS_DIRECTORY,
MENU_ENUM_LABEL_VALUE_THUMBNAILS_DIRECTORY,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-10-18 05:09:49 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 17:26:02 +00:00
settings->directory.menu_content,
sizeof(settings->directory.menu_content),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_RGUI_BROWSER_DIRECTORY,
MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-10-18 05:05:15 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 17:26:02 +00:00
settings->directory.menu_config,
sizeof(settings->directory.menu_config),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_RGUI_CONFIG_DIRECTORY,
MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 17:26:02 +00:00
settings->directory.libretro,
sizeof(settings->directory.libretro),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_LIBRETRO_DIR_PATH,
MENU_ENUM_LABEL_VALUE_LIBRETRO_DIR_PATH,
2016-03-20 19:45:06 +00:00
g_defaults.dir.core,
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_CORE_INFO_INIT);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 17:52:25 +00:00
settings->path.libretro_info,
sizeof(settings->path.libretro_info),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_LIBRETRO_INFO_PATH,
MENU_ENUM_LABEL_VALUE_LIBRETRO_INFO_PATH,
2016-03-20 19:45:06 +00:00
g_defaults.dir.core_info,
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2016-05-09 18:51:53 +00:00
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_CORE_INFO_INIT);
2015-06-02 18:26:27 +00:00
#ifdef HAVE_LIBRETRODB
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 18:49:13 +00:00
settings->path.content_database,
sizeof(settings->path.content_database),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_CONTENT_DATABASE_DIRECTORY,
MENU_ENUM_LABEL_VALUE_CONTENT_DATABASE_DIRECTORY,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 17:26:02 +00:00
settings->directory.cursor,
sizeof(settings->directory.cursor),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_CURSOR_DIRECTORY,
MENU_ENUM_LABEL_VALUE_CURSOR_DIRECTORY,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-06-02 18:26:27 +00:00
#endif
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 18:49:13 +00:00
settings->path.cheat_database,
sizeof(settings->path.cheat_database),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_CHEAT_DATABASE_PATH,
MENU_ENUM_LABEL_VALUE_CHEAT_DATABASE_PATH,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 18:49:13 +00:00
settings->directory.video_filter,
sizeof(settings->directory.video_filter),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VIDEO_FILTER_DIR,
MENU_ENUM_LABEL_VALUE_VIDEO_FILTER_DIR,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 18:49:13 +00:00
settings->directory.audio_filter,
sizeof(settings->directory.audio_filter),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_AUDIO_FILTER_DIR,
MENU_ENUM_LABEL_VALUE_AUDIO_FILTER_DIR,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 18:49:13 +00:00
settings->directory.video_shader,
sizeof(settings->directory.video_shader),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VIDEO_SHADER_DIR,
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_DIR,
2016-03-20 19:45:06 +00:00
g_defaults.dir.shader,
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2016-03-20 19:45:06 +00:00
if (!string_is_equal(settings->record.driver, "null"))
{
CONFIG_DIR(
list, list_info,
global->record.output_dir,
sizeof(global->record.output_dir),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_RECORDING_OUTPUT_DIRECTORY,
MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
CONFIG_DIR(
list, list_info,
global->record.config_dir,
sizeof(global->record.config_dir),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_RECORDING_CONFIG_DIRECTORY,
MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
}
2015-06-02 18:26:27 +00:00
#ifdef HAVE_OVERLAY
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 17:26:02 +00:00
settings->directory.overlay,
sizeof(settings->directory.overlay),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_OVERLAY_DIRECTORY,
MENU_ENUM_LABEL_VALUE_OVERLAY_DIRECTORY,
2016-03-20 19:45:06 +00:00
g_defaults.dir.overlay,
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-06-02 18:26:27 +00:00
#endif
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 17:26:02 +00:00
settings->directory.screenshot,
sizeof(settings->directory.screenshot),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_SCREENSHOT_DIRECTORY,
MENU_ENUM_LABEL_VALUE_SCREENSHOT_DIRECTORY,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_CONTENT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 18:49:13 +00:00
settings->directory.autoconfig,
sizeof(settings->directory.autoconfig),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_JOYPAD_AUTOCONFIG_DIR,
MENU_ENUM_LABEL_VALUE_JOYPAD_AUTOCONFIG_DIR,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 17:26:02 +00:00
settings->directory.input_remapping,
sizeof(settings->directory.input_remapping),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_INPUT_REMAPPING_DIRECTORY,
MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 17:26:02 +00:00
settings->directory.playlist,
sizeof(settings->directory.playlist),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_PLAYLIST_DIRECTORY,
MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-10-03 06:15:41 +00:00
dir_get_ptr(RARCH_DIR_SAVEFILE),
2016-10-03 06:07:52 +00:00
dir_get_size(RARCH_DIR_SAVEFILE),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_SAVEFILE_DIRECTORY,
MENU_ENUM_LABEL_VALUE_SAVEFILE_DIRECTORY,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_CONTENT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-06-07 23:40:25 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-10-03 06:15:41 +00:00
dir_get_ptr(RARCH_DIR_SAVESTATE),
2016-10-03 06:07:52 +00:00
dir_get_size(RARCH_DIR_SAVESTATE),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_SAVESTATE_DIRECTORY,
MENU_ENUM_LABEL_VALUE_SAVESTATE_DIRECTORY,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_CONTENT,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
CONFIG_DIR(
list, list_info,
2016-04-28 17:26:02 +00:00
settings->directory.cache,
sizeof(settings->directory.cache),
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_CACHE_DIRECTORY,
MENU_ENUM_LABEL_VALUE_CACHE_DIRECTORY,
2016-03-20 19:45:06 +00:00
"",
2016-10-26 03:28:16 +00:00
MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_PRIVACY:
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PRIVACY_SETTINGS), parent_group);
2015-06-02 18:26:27 +00:00
2016-07-02 18:40:27 +00:00
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_PRIVACY_SETTINGS);
2016-03-20 19:45:06 +00:00
START_SUB_GROUP(list, list_info, "State",
&group_info, &subgroup_info, parent_group);
2016-03-20 19:45:06 +00:00
if (!string_is_equal(settings->camera.driver, "null"))
{
CONFIG_BOOL(
list, list_info,
&settings->camera.allow,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_CAMERA_ALLOW,
MENU_ENUM_LABEL_VALUE_CAMERA_ALLOW,
2016-03-20 19:45:06 +00:00
false,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
2016-03-20 19:45:06 +00:00
}
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
if (!string_is_equal(settings->location.driver, "null"))
{
CONFIG_BOOL(
list, list_info,
&settings->location.allow,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_LOCATION_ALLOW,
MENU_ENUM_LABEL_VALUE_LOCATION_ALLOW,
2016-03-20 19:45:06 +00:00
false,
2016-10-26 03:04:24 +00:00
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
2016-03-20 19:45:06 +00:00
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler,
SD_FLAG_NONE);
2016-03-20 19:45:06 +00:00
}
2015-06-02 18:26:27 +00:00
2016-03-20 19:45:06 +00:00
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_NONE:
default:
break;
}
2015-06-07 23:40:25 +00:00
2015-06-02 18:26:27 +00:00
return true;
}
2016-06-16 23:07:52 +00:00
bool menu_setting_free(void *data)
{
2016-06-16 23:07:52 +00:00
unsigned values, n;
2016-03-18 21:27:40 +00:00
rarch_setting_t *setting = (rarch_setting_t*)data;
rarch_setting_t **list = &setting;
2015-06-26 16:35:35 +00:00
2016-06-16 23:07:52 +00:00
if (!setting)
2016-03-18 21:27:40 +00:00
return false;
/* Free data which was previously tagged */
2016-10-31 14:01:40 +00:00
for (; setting_get_type(setting) != ST_NONE; (*list = *list + 1))
for (values = setting->free_flags, n = 0; values != 0; values >>= 1, n++)
if (values & 1)
switch (1 << n)
{
case SD_FREE_FLAG_VALUES:
2015-10-11 21:07:43 +00:00
free((void*)setting->values);
setting->values = NULL;
break;
case SD_FREE_FLAG_NAME:
free((void*)setting->name);
setting->name = NULL;
break;
case SD_FREE_FLAG_SHORT:
free((void*)setting->short_description);
setting->short_description = NULL;
break;
default:
break;
}
2016-03-18 21:27:40 +00:00
free(data);
return true;
}
2016-03-20 18:29:59 +00:00
static rarch_setting_t *menu_setting_new_internal(rarch_setting_info_t *list_info)
2015-06-02 18:26:27 +00:00
{
2016-03-20 18:56:03 +00:00
unsigned i;
2016-03-20 19:45:06 +00:00
rarch_setting_t* resized_list = NULL;
enum settings_list_type list_types[] =
2016-03-20 19:45:06 +00:00
{
SETTINGS_LIST_MAIN_MENU,
SETTINGS_LIST_DRIVERS,
SETTINGS_LIST_CORE,
SETTINGS_LIST_CONFIGURATION,
SETTINGS_LIST_LOGGING,
SETTINGS_LIST_SAVING,
SETTINGS_LIST_REWIND,
SETTINGS_LIST_VIDEO,
SETTINGS_LIST_AUDIO,
SETTINGS_LIST_INPUT,
SETTINGS_LIST_INPUT_HOTKEY,
SETTINGS_LIST_RECORDING,
SETTINGS_LIST_FRAME_THROTTLING,
SETTINGS_LIST_FONT,
SETTINGS_LIST_OVERLAY,
SETTINGS_LIST_MENU,
SETTINGS_LIST_MENU_FILE_BROWSER,
SETTINGS_LIST_MULTIMEDIA,
SETTINGS_LIST_USER_INTERFACE,
SETTINGS_LIST_PLAYLIST,
SETTINGS_LIST_CHEEVOS,
SETTINGS_LIST_CORE_UPDATER,
SETTINGS_LIST_NETPLAY,
SETTINGS_LIST_LAKKA_SERVICES,
2016-03-20 19:45:06 +00:00
SETTINGS_LIST_USER,
SETTINGS_LIST_USER_ACCOUNTS,
SETTINGS_LIST_USER_ACCOUNTS_CHEEVOS,
SETTINGS_LIST_DIRECTORY,
SETTINGS_LIST_PRIVACY
};
2016-08-29 01:07:20 +00:00
rarch_setting_t terminator = setting_terminator_setting();
const char *root = msg_hash_to_str(MENU_ENUM_LABEL_MAIN_MENU);
2016-03-20 19:45:06 +00:00
rarch_setting_t *list = (rarch_setting_t*)calloc(
list_info->size, sizeof(*list));
2015-06-02 18:26:27 +00:00
if (!list)
goto error;
2016-03-20 19:45:06 +00:00
for (i = 0; i < ARRAY_SIZE(list_types); i++)
2016-03-20 18:56:03 +00:00
{
if (!setting_append_list(list_types[i], &list, list_info, root))
goto error;
}
2015-06-02 18:26:27 +00:00
2016-08-29 01:07:20 +00:00
if (!(settings_list_append(&list, list_info)))
2015-06-02 18:26:27 +00:00
goto error;
2016-05-23 22:28:26 +00:00
if (terminator.name)
terminator.name_hash = msg_hash_calculate(terminator.name);
2016-05-23 22:28:26 +00:00
(*&list)[list_info->index++] = terminator;
2015-06-02 18:26:27 +00:00
/* flatten this array to save ourselves some kilobytes. */
2016-03-20 18:54:16 +00:00
resized_list = (rarch_setting_t*)realloc(list,
list_info->index * sizeof(rarch_setting_t));
2016-03-20 18:29:59 +00:00
if (!resized_list)
2015-06-02 18:26:27 +00:00
goto error;
2016-03-20 18:29:59 +00:00
list = resized_list;
2015-06-02 18:26:27 +00:00
return list;
error:
2016-03-20 18:29:59 +00:00
if (list)
free(list);
return NULL;
}
2015-06-02 18:26:27 +00:00
2016-03-20 18:29:59 +00:00
/**
* menu_setting_new:
* @mask : Bitmask of settings to include.
*
* Request a list of settings based on @mask.
*
* Returns: settings list composed of all requested
* settings on success, otherwise NULL.
**/
static rarch_setting_t *menu_setting_new(void)
{
rarch_setting_t* list = NULL;
rarch_setting_info_t *list_info = (rarch_setting_info_t*)
calloc(1, sizeof(*list_info));
if (!list_info)
return NULL;
list_info->size = 32;
list = menu_setting_new_internal(list_info);
menu_settings_info_list_free(list_info);
2015-09-28 16:44:28 +00:00
list_info = NULL;
2016-03-20 18:29:59 +00:00
return list;
2015-06-02 18:26:27 +00:00
}
2016-03-18 21:16:57 +00:00
bool menu_setting_ctl(enum menu_setting_ctl_state state, void *data)
{
2016-03-18 21:23:51 +00:00
uint64_t flags;
2016-03-18 21:16:57 +00:00
switch (state)
{
2016-03-18 21:23:51 +00:00
case MENU_SETTING_CTL_IS_OF_PATH_TYPE:
{
bool cbs_bound = false;
rarch_setting_t *setting = (rarch_setting_t*)data;
if (!setting)
return false;
flags = setting->flags;
2016-03-18 21:23:51 +00:00
2016-10-31 14:01:40 +00:00
if (setting_get_type(setting) != ST_ACTION)
2016-03-18 21:23:51 +00:00
return false;
if (!setting->change_handler)
return false;
cbs_bound = setting->action_right;
cbs_bound = cbs_bound || setting->action_left;
cbs_bound = cbs_bound || setting->action_select;
if (!cbs_bound)
return false;
if (!(flags & SD_FLAG_BROWSER_ACTION))
return false;
}
2016-03-18 21:31:14 +00:00
break;
case MENU_SETTING_CTL_NEW:
{
rarch_setting_t **setting = (rarch_setting_t**)data;
if (!setting)
return false;
*setting = menu_setting_new();
}
break;
2016-03-18 22:31:11 +00:00
case MENU_SETTING_CTL_ACTION_RIGHT:
{
rarch_setting_t *setting = (rarch_setting_t*)data;
2016-03-18 22:32:40 +00:00
if (!setting)
2016-03-18 22:31:11 +00:00
return false;
2016-03-18 22:32:40 +00:00
if (setting_handler(setting, MENU_ACTION_RIGHT) == -1)
return false;
2016-03-18 22:31:11 +00:00
}
break;
2016-03-18 21:16:57 +00:00
case MENU_SETTING_CTL_NONE:
default:
break;
}
return true;
}