2014-09-12 03:54:58 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
|
|
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
2016-01-10 03:06:50 +00:00
|
|
|
* Copyright (C) 2011-2016 - Daniel De Matteis
|
2014-09-12 03:54:58 +00:00
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2015-09-06 12:59:20 +00:00
|
|
|
#if defined(__CELLOS_LV2__)
|
|
|
|
#include <sdk_version.h>
|
|
|
|
|
|
|
|
#if (CELL_SDK_VERSION > 0x340000)
|
|
|
|
#include <sysutil/sysutil_bgmplayback.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2016-03-20 13:53:54 +00:00
|
|
|
#include <lists/file_list.h>
|
2015-06-02 18:26:27 +00:00
|
|
|
#include <file/file_path.h>
|
2015-06-13 15:13:10 +00:00
|
|
|
#include <file/config_file.h>
|
2015-12-26 06:37:44 +00:00
|
|
|
#include <string/stdstring.h>
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-02-03 13:36:34 +00:00
|
|
|
#include "../frontend/frontend_driver.h"
|
2015-09-06 12:59:20 +00:00
|
|
|
|
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"
|
2015-09-22 20:14:03 +00:00
|
|
|
#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-13 17:12:10 +00:00
|
|
|
#include "menu_hash.h"
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-12-06 21:48:57 +00:00
|
|
|
#include "../defaults.h"
|
2015-06-02 18:26:27 +00:00
|
|
|
#include "../driver.h"
|
2015-06-13 17:12:10 +00:00
|
|
|
#include "../general.h"
|
2015-12-06 18:31:47 +00:00
|
|
|
#include "../system.h"
|
2015-06-02 18:26:27 +00:00
|
|
|
#include "../dynamic.h"
|
2015-12-05 14:55:26 +00:00
|
|
|
#include "../camera/camera_driver.h"
|
2015-12-05 14:47:33 +00:00
|
|
|
#include "../location/location_driver.h"
|
2015-12-05 15:12:29 +00:00
|
|
|
#include "../record/record_driver.h"
|
2015-11-23 18:40:09 +00:00
|
|
|
#include "../audio/audio_driver.h"
|
2015-11-23 20:58:39 +00:00
|
|
|
#include "../audio/audio_resampler_driver.h"
|
2015-11-28 01:22:46 +00:00
|
|
|
#include "../input/input_config.h"
|
2015-06-02 18:26:27 +00:00
|
|
|
#include "../input/input_autodetect.h"
|
|
|
|
#include "../config.def.h"
|
|
|
|
#include "../performance.h"
|
|
|
|
|
2016-02-09 16:41:19 +00:00
|
|
|
#include "../tasks/tasks_internal.h"
|
|
|
|
|
2015-10-11 12:49:34 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
struct rarch_setting_info
|
2015-10-11 12:49:34 +00:00
|
|
|
{
|
|
|
|
int index;
|
|
|
|
int size;
|
2015-11-21 15:32:22 +00:00
|
|
|
};
|
2015-10-11 12:49:34 +00:00
|
|
|
|
2015-11-21 10:22:34 +00:00
|
|
|
struct rarch_setting_group_info
|
2015-10-11 12:49:34 +00:00
|
|
|
{
|
|
|
|
const char *name;
|
2015-11-21 10:22:34 +00:00
|
|
|
};
|
2015-10-11 12:49:34 +00:00
|
|
|
|
|
|
|
struct rarch_setting
|
|
|
|
{
|
|
|
|
enum setting_type type;
|
|
|
|
|
|
|
|
uint32_t size;
|
|
|
|
|
|
|
|
const char *name;
|
|
|
|
uint32_t name_hash;
|
|
|
|
const char *short_description;
|
|
|
|
const char *group;
|
|
|
|
const char *subgroup;
|
|
|
|
const char *parent_group;
|
|
|
|
const char *values;
|
|
|
|
|
|
|
|
uint32_t index;
|
|
|
|
unsigned index_offset;
|
|
|
|
|
|
|
|
double min;
|
|
|
|
double max;
|
|
|
|
|
|
|
|
uint64_t flags;
|
|
|
|
|
|
|
|
change_handler_t change_handler;
|
|
|
|
change_handler_t read_handler;
|
|
|
|
action_start_handler_t action_start;
|
|
|
|
action_left_handler_t action_left;
|
|
|
|
action_right_handler_t action_right;
|
|
|
|
action_up_handler_t action_up;
|
|
|
|
action_down_handler_t action_down;
|
|
|
|
action_cancel_handler_t action_cancel;
|
|
|
|
action_ok_handler_t action_ok;
|
|
|
|
action_select_handler_t action_select;
|
|
|
|
get_string_representation_t get_string_representation;
|
|
|
|
|
|
|
|
union
|
|
|
|
{
|
|
|
|
bool boolean;
|
|
|
|
int integer;
|
|
|
|
unsigned int unsigned_integer;
|
|
|
|
float fraction;
|
|
|
|
const char *string;
|
|
|
|
const struct retro_keybind *keybind;
|
|
|
|
} default_value;
|
|
|
|
|
2016-03-18 18:01:42 +00:00
|
|
|
struct
|
2015-10-11 12:49:34 +00:00
|
|
|
{
|
2016-03-18 18:04:49 +00:00
|
|
|
union
|
|
|
|
{
|
|
|
|
bool boolean;
|
|
|
|
int integer;
|
|
|
|
unsigned int unsigned_integer;
|
|
|
|
float fraction;
|
2016-03-18 19:45:01 +00:00
|
|
|
char string[PATH_MAX_LENGTH];
|
2016-03-18 18:04:49 +00:00
|
|
|
struct retro_keybind keybind;
|
|
|
|
} source;
|
|
|
|
|
2016-03-18 18:01:42 +00:00
|
|
|
union
|
|
|
|
{
|
|
|
|
bool *boolean;
|
|
|
|
int *integer;
|
|
|
|
unsigned int *unsigned_integer;
|
|
|
|
float *fraction;
|
|
|
|
char *string;
|
|
|
|
struct retro_keybind *keybind;
|
|
|
|
} target;
|
2015-10-11 12:49:34 +00:00
|
|
|
} value;
|
|
|
|
|
|
|
|
union
|
|
|
|
{
|
|
|
|
bool boolean;
|
|
|
|
int integer;
|
|
|
|
unsigned int unsigned_integer;
|
|
|
|
float fraction;
|
|
|
|
} original_value;
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
const char *empty_path;
|
|
|
|
} dir;
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
enum event_command idx;
|
|
|
|
bool triggered;
|
|
|
|
} cmd_trigger;
|
|
|
|
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
const char *off_label;
|
|
|
|
const char *on_label;
|
|
|
|
} boolean;
|
|
|
|
|
|
|
|
unsigned bind_type;
|
2015-10-11 15:17:05 +00:00
|
|
|
enum setting_type browser_selection_type;
|
2015-10-11 12:49:34 +00:00
|
|
|
float step;
|
|
|
|
const char *rounding_fraction;
|
|
|
|
bool enforce_minrange;
|
|
|
|
bool enforce_maxrange;
|
|
|
|
};
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/* forward decls */
|
|
|
|
static void setting_get_string_representation_default(void *data,
|
|
|
|
char *s, size_t len);
|
|
|
|
static int setting_action_action_ok(void *data, bool wraparound);
|
|
|
|
static int setting_generic_action_start_default(void *data);
|
|
|
|
static int setting_fraction_action_left_default(
|
|
|
|
void *data, bool wraparound);
|
|
|
|
static int setting_fraction_action_right_default(
|
|
|
|
void *data, bool wraparound);
|
|
|
|
static int setting_generic_action_ok_default(void *data, bool wraparound);
|
|
|
|
static void setting_get_string_representation_st_float(void *data,
|
|
|
|
char *s, size_t len);
|
|
|
|
static int setting_uint_action_left_default(void *data, bool wraparound);
|
|
|
|
static int setting_uint_action_right_default(void *data, bool wraparound);
|
|
|
|
static void setting_get_string_representation_uint(void *data,
|
|
|
|
char *s, size_t len);
|
|
|
|
static void setting_get_string_representation_hex(void *data,
|
|
|
|
char *s, size_t len);
|
|
|
|
static int setting_bind_action_start(void *data);
|
|
|
|
static void setting_get_string_representation_st_bind(void *data,
|
|
|
|
char *s, size_t len);
|
|
|
|
static int setting_bind_action_ok(void *data, bool wraparound);
|
|
|
|
static void setting_get_string_representation_st_string(void *data,
|
|
|
|
char *s, size_t len);
|
|
|
|
static int setting_string_action_start_generic(void *data);
|
|
|
|
static void setting_get_string_representation_st_dir(void *data,
|
|
|
|
char *s, size_t len);
|
|
|
|
static void setting_get_string_representation_st_path(void *data,
|
|
|
|
char *s, size_t len);
|
2015-09-26 00:22:01 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/**
|
|
|
|
* setting_action_setting:
|
|
|
|
* @name : Name of setting.
|
|
|
|
* @short_description : Short description of setting.
|
|
|
|
* @group : Group that the setting belongs to.
|
|
|
|
* @subgroup : Subgroup that the setting belongs to.
|
|
|
|
*
|
|
|
|
* Initializes a setting of type ST_ACTION.
|
|
|
|
*
|
|
|
|
* Returns: setting of type ST_ACTION.
|
|
|
|
**/
|
2015-11-23 11:17:16 +00:00
|
|
|
static rarch_setting_t setting_action_setting(const char* name,
|
2015-11-21 15:32:22 +00:00
|
|
|
const char* short_description,
|
|
|
|
const char *group, const char *subgroup,
|
|
|
|
const char *parent_group)
|
2015-10-11 11:16:38 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t result = {ST_NONE};
|
2015-10-11 11:16:38 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.type = ST_ACTION;
|
|
|
|
result.name = name;
|
2015-06-03 09:24:53 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.short_description = short_description;
|
|
|
|
result.parent_group = parent_group;
|
|
|
|
result.group = group;
|
|
|
|
result.subgroup = subgroup;
|
|
|
|
result.change_handler = NULL;
|
|
|
|
result.read_handler = NULL;
|
|
|
|
result.get_string_representation = &setting_get_string_representation_default;
|
|
|
|
result.action_start = NULL;
|
|
|
|
result.action_left = NULL;
|
|
|
|
result.action_right = NULL;
|
|
|
|
result.action_ok = setting_action_action_ok;
|
|
|
|
result.action_select = setting_action_action_ok;
|
|
|
|
result.action_cancel = NULL;
|
2015-10-11 12:46:47 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return result;
|
2015-10-11 12:46:47 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/**
|
|
|
|
* setting_group_setting:
|
|
|
|
* @type : type of settting.
|
|
|
|
* @name : name of setting.
|
|
|
|
*
|
|
|
|
* Initializes a setting of type ST_GROUP.
|
|
|
|
*
|
|
|
|
* Returns: setting of type ST_GROUP.
|
|
|
|
**/
|
2015-11-23 11:16:09 +00:00
|
|
|
static rarch_setting_t setting_group_setting(enum setting_type type, const char* name,
|
2015-11-21 15:32:22 +00:00
|
|
|
const char *parent_group)
|
2015-06-03 09:24:53 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t result = {ST_NONE};
|
2015-06-03 09:24:53 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.parent_group = parent_group;
|
|
|
|
result.type = type;
|
|
|
|
result.name = name;
|
|
|
|
result.short_description = name;
|
2015-06-03 09:24:53 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.get_string_representation = &setting_get_string_representation_default;
|
2015-06-13 17:11:18 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return result;
|
2015-06-03 09:24:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/**
|
|
|
|
* setting_float_setting:
|
|
|
|
* @name : name of setting.
|
|
|
|
* @short_description : Short description of setting.
|
|
|
|
* @target : Target of float setting.
|
|
|
|
* @default_value : Default value (in float).
|
|
|
|
* @rounding : Rounding (for float-to-string representation).
|
|
|
|
* @group : Group that the setting belongs to.
|
|
|
|
* @subgroup : Subgroup that the setting belongs to.
|
|
|
|
* @change_handler : Function callback for change handler function pointer.
|
|
|
|
* @read_handler : Function callback for read handler function pointer.
|
|
|
|
*
|
|
|
|
* Initializes a setting of type ST_FLOAT.
|
|
|
|
*
|
|
|
|
* Returns: setting of type ST_FLOAT.
|
|
|
|
**/
|
|
|
|
static rarch_setting_t setting_float_setting(const char* name,
|
|
|
|
const char* short_description, float* target, float default_value,
|
|
|
|
const char *rounding, const char *group, const char *subgroup,
|
|
|
|
const char *parent_group,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
2015-06-03 09:24:53 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t result = {ST_NONE};
|
2015-06-03 09:24:53 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.type = ST_FLOAT;
|
|
|
|
result.name = name;
|
|
|
|
result.size = sizeof(float);
|
|
|
|
result.short_description = short_description;
|
|
|
|
result.group = group;
|
|
|
|
result.subgroup = subgroup;
|
|
|
|
result.parent_group = parent_group;
|
2015-06-03 09:24:53 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.rounding_fraction = rounding;
|
|
|
|
result.change_handler = change_handler;
|
|
|
|
result.read_handler = read_handler;
|
2016-03-18 18:01:42 +00:00
|
|
|
result.value.target.fraction = target;
|
2015-11-21 15:32:22 +00:00
|
|
|
result.original_value.fraction = *target;
|
|
|
|
result.default_value.fraction = default_value;
|
|
|
|
result.action_start = setting_generic_action_start_default;
|
|
|
|
result.action_left = setting_fraction_action_left_default;
|
|
|
|
result.action_right = setting_fraction_action_right_default;
|
|
|
|
result.action_ok = setting_generic_action_ok_default;
|
|
|
|
result.action_select = setting_generic_action_ok_default;
|
|
|
|
result.action_cancel = NULL;
|
2015-06-03 07:03:57 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.get_string_representation = &setting_get_string_representation_st_float;
|
2014-10-28 21:32:00 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return result;
|
|
|
|
}
|
2015-06-06 14:26:55 +00:00
|
|
|
|
2014-10-15 03:51:00 +00:00
|
|
|
|
2015-06-03 07:03:57 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/**
|
|
|
|
* setting_uint_setting:
|
|
|
|
* @name : name of setting.
|
|
|
|
* @short_description : Short description of setting.
|
|
|
|
* @target : Target of unsigned integer setting.
|
|
|
|
* @default_value : Default value (in unsigned integer format).
|
|
|
|
* @group : Group that the setting belongs to.
|
|
|
|
* @subgroup : Subgroup that the setting belongs to.
|
|
|
|
* @change_handler : Function callback for change handler function pointer.
|
|
|
|
* @read_handler : Function callback for read handler function pointer.
|
|
|
|
*
|
|
|
|
* Initializes a setting of type ST_UINT.
|
|
|
|
*
|
|
|
|
* Returns: setting of type ST_UINT.
|
|
|
|
**/
|
|
|
|
static rarch_setting_t setting_uint_setting(const char* name,
|
|
|
|
const char* short_description, unsigned int* target,
|
|
|
|
unsigned int default_value,
|
|
|
|
const char *group, const char *subgroup, const char *parent_group,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
2015-06-03 07:03:57 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t result = {ST_NONE};
|
2015-06-03 07:03:57 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.type = ST_UINT;
|
|
|
|
result.name = name;
|
|
|
|
result.size = sizeof(unsigned int);
|
|
|
|
result.short_description = short_description;
|
|
|
|
result.group = group;
|
|
|
|
result.subgroup = subgroup;
|
|
|
|
result.parent_group = parent_group;
|
2014-09-14 22:34:00 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.change_handler = change_handler;
|
|
|
|
result.read_handler = read_handler;
|
2016-03-18 18:01:42 +00:00
|
|
|
result.value.target.unsigned_integer = target;
|
2015-11-21 15:32:22 +00:00
|
|
|
result.original_value.unsigned_integer = *target;
|
|
|
|
result.default_value.unsigned_integer = default_value;
|
|
|
|
result.action_start = setting_generic_action_start_default;
|
|
|
|
result.action_left = setting_uint_action_left_default;
|
|
|
|
result.action_right = setting_uint_action_right_default;
|
|
|
|
result.action_ok = setting_generic_action_ok_default;
|
|
|
|
result.action_select = setting_generic_action_ok_default;
|
|
|
|
result.action_cancel = NULL;
|
|
|
|
result.get_string_representation = &setting_get_string_representation_uint;
|
2014-09-14 22:34:00 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return result;
|
2014-09-14 22:34:00 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/**
|
|
|
|
* setting_hex_setting:
|
|
|
|
* @name : name of setting.
|
|
|
|
* @short_description : Short description of setting.
|
|
|
|
* @target : Target of unsigned integer setting.
|
|
|
|
* @default_value : Default value (in unsigned integer format).
|
|
|
|
* @group : Group that the setting belongs to.
|
|
|
|
* @subgroup : Subgroup that the setting belongs to.
|
|
|
|
* @change_handler : Function callback for change handler function pointer.
|
|
|
|
* @read_handler : Function callback for read handler function pointer.
|
|
|
|
*
|
|
|
|
* Initializes a setting of type ST_HEX.
|
|
|
|
*
|
|
|
|
* Returns: setting of type ST_HEX.
|
|
|
|
**/
|
|
|
|
static rarch_setting_t setting_hex_setting(const char* name,
|
|
|
|
const char* short_description, unsigned int* target,
|
|
|
|
unsigned int default_value,
|
|
|
|
const char *group, const char *subgroup, const char *parent_group,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
2014-10-14 23:14:35 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t result = {ST_NONE};
|
2014-10-15 03:51:00 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.type = ST_HEX;
|
|
|
|
result.name = name;
|
|
|
|
result.size = sizeof(unsigned int);
|
|
|
|
result.short_description = short_description;
|
|
|
|
result.group = group;
|
|
|
|
result.subgroup = subgroup;
|
|
|
|
result.parent_group = parent_group;
|
2015-03-17 02:28:06 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.change_handler = change_handler;
|
|
|
|
result.read_handler = read_handler;
|
2016-03-18 18:01:42 +00:00
|
|
|
result.value.target.unsigned_integer = target;
|
2015-11-21 15:32:22 +00:00
|
|
|
result.original_value.unsigned_integer = *target;
|
|
|
|
result.default_value.unsigned_integer = default_value;
|
|
|
|
result.action_start = setting_generic_action_start_default;
|
|
|
|
result.action_left = NULL;
|
|
|
|
result.action_right = NULL;
|
|
|
|
result.action_ok = setting_generic_action_ok_default;
|
|
|
|
result.action_select = setting_generic_action_ok_default;
|
|
|
|
result.action_cancel = NULL;
|
|
|
|
result.get_string_representation = &setting_get_string_representation_hex;
|
|
|
|
|
|
|
|
return result;
|
2014-10-28 21:32:00 +00:00
|
|
|
}
|
2014-10-15 03:51:00 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/**
|
|
|
|
* setting_bind_setting:
|
|
|
|
* @name : name of setting.
|
|
|
|
* @short_description : Short description of setting.
|
|
|
|
* @target : Target of bind setting.
|
|
|
|
* @idx : Index of bind setting.
|
|
|
|
* @idx_offset : Index offset of bind setting.
|
|
|
|
* @default_value : Default value (in bind format).
|
|
|
|
* @group : Group that the setting belongs to.
|
|
|
|
* @subgroup : Subgroup that the setting belongs to.
|
|
|
|
*
|
|
|
|
* Initializes a setting of type ST_BIND.
|
|
|
|
*
|
|
|
|
* Returns: setting of type ST_BIND.
|
|
|
|
**/
|
|
|
|
static rarch_setting_t setting_bind_setting(const char* name,
|
|
|
|
const char* short_description, struct retro_keybind* target,
|
|
|
|
uint32_t idx, uint32_t idx_offset,
|
|
|
|
const struct retro_keybind* default_value,
|
|
|
|
const char *group, const char *subgroup, const char *parent_group)
|
2014-09-24 05:56:47 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t result = {ST_NONE};
|
2015-04-14 10:56:37 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.type = ST_BIND;
|
|
|
|
result.name = name;
|
|
|
|
result.size = 0;
|
|
|
|
result.short_description = short_description;
|
|
|
|
result.group = group;
|
|
|
|
result.subgroup = subgroup;
|
|
|
|
result.parent_group = parent_group;
|
2014-10-14 23:23:13 +00:00
|
|
|
|
2016-03-18 18:01:42 +00:00
|
|
|
result.value.target.keybind = target;
|
2015-11-21 15:32:22 +00:00
|
|
|
result.default_value.keybind = default_value;
|
|
|
|
result.index = idx;
|
|
|
|
result.index_offset = idx_offset;
|
|
|
|
result.action_start = setting_bind_action_start;
|
|
|
|
result.action_ok = setting_bind_action_ok;
|
|
|
|
result.action_select = setting_bind_action_ok;
|
|
|
|
result.action_cancel = NULL;
|
|
|
|
result.get_string_representation = &setting_get_string_representation_st_bind;
|
2015-09-26 00:22:01 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return result;
|
|
|
|
}
|
2015-06-03 22:09:07 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/**
|
|
|
|
* setting_string_setting:
|
|
|
|
* @type : type of setting.
|
|
|
|
* @name : name of setting.
|
|
|
|
* @short_description : Short description of setting.
|
|
|
|
* @target : Target of string setting.
|
|
|
|
* @size : Size of string setting.
|
|
|
|
* @default_value : Default value (in string format).
|
|
|
|
* @empty : TODO/FIXME: ???
|
|
|
|
* @group : Group that the setting belongs to.
|
|
|
|
* @subgroup : Subgroup that the setting belongs to.
|
|
|
|
* @change_handler : Function callback for change handler function pointer.
|
|
|
|
* @read_handler : Function callback for read handler function pointer.
|
|
|
|
*
|
|
|
|
* Initializes a string setting (of type @type).
|
|
|
|
*
|
|
|
|
* Returns: String setting of type @type.
|
|
|
|
**/
|
|
|
|
static rarch_setting_t setting_string_setting(enum setting_type type,
|
|
|
|
const char* name, const char* short_description, char* target,
|
|
|
|
unsigned size, const char* default_value, const char *empty,
|
|
|
|
const char *group, const char *subgroup, const char *parent_group,
|
|
|
|
change_handler_t change_handler,
|
|
|
|
change_handler_t read_handler)
|
|
|
|
{
|
|
|
|
rarch_setting_t result = {ST_NONE};
|
2015-09-25 13:55:58 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.type = type;
|
|
|
|
result.name = name;
|
|
|
|
result.size = size;
|
|
|
|
result.short_description = short_description;
|
|
|
|
result.group = group;
|
|
|
|
result.subgroup = subgroup;
|
|
|
|
result.parent_group = parent_group;
|
2015-05-17 13:00:03 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.dir.empty_path = empty;
|
|
|
|
result.change_handler = change_handler;
|
|
|
|
result.read_handler = read_handler;
|
2016-03-18 18:01:42 +00:00
|
|
|
result.value.target.string = target;
|
2015-11-21 15:32:22 +00:00
|
|
|
result.default_value.string = default_value;
|
|
|
|
result.action_start = NULL;
|
|
|
|
result.get_string_representation = &setting_get_string_representation_st_string;
|
|
|
|
|
|
|
|
switch (type)
|
|
|
|
{
|
2014-10-17 00:02:23 +00:00
|
|
|
case ST_DIR:
|
2015-11-21 15:32:22 +00:00
|
|
|
result.action_start = setting_string_action_start_generic;
|
|
|
|
result.browser_selection_type = ST_DIR;
|
|
|
|
result.get_string_representation = &setting_get_string_representation_st_dir;
|
|
|
|
break;
|
|
|
|
case ST_PATH:
|
|
|
|
result.action_start = setting_string_action_start_generic;
|
|
|
|
result.browser_selection_type = ST_PATH;
|
|
|
|
result.get_string_representation = &setting_get_string_representation_st_path;
|
2015-06-03 08:33:41 +00:00
|
|
|
break;
|
2014-10-16 15:19:48 +00:00
|
|
|
default:
|
|
|
|
break;
|
2014-09-24 05:56:47 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return result;
|
2014-09-24 05:56:47 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/**
|
|
|
|
* setting_string_setting_options:
|
|
|
|
* @type : type of settting.
|
|
|
|
* @name : name of setting.
|
|
|
|
* @short_description : Short description of setting.
|
|
|
|
* @target : Target of bind setting.
|
|
|
|
* @size : Size of string setting.
|
|
|
|
* @default_value : Default value.
|
|
|
|
* @empty : N/A.
|
|
|
|
* @values : Values, separated by a delimiter.
|
|
|
|
* @group : Group that the setting belongs to.
|
|
|
|
* @subgroup : Subgroup that the setting belongs to.
|
|
|
|
* @change_handler : Function callback for change handler function pointer.
|
|
|
|
* @read_handler : Function callback for read handler function pointer.
|
|
|
|
*
|
|
|
|
* Initializes a string options list setting.
|
|
|
|
*
|
|
|
|
* Returns: string option list setting.
|
|
|
|
**/
|
|
|
|
static rarch_setting_t setting_string_setting_options(enum setting_type type,
|
|
|
|
const char* name, const char* short_description, char* target,
|
|
|
|
unsigned size, const char* default_value,
|
|
|
|
const char *empty, const char *values,
|
|
|
|
const char *group, const char *subgroup, const char *parent_group,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
2015-09-28 00:10:44 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t result = setting_string_setting(type, name,
|
|
|
|
short_description, target, size, default_value, empty, group,
|
|
|
|
subgroup, parent_group, change_handler, read_handler);
|
2015-09-28 00:10:44 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.parent_group = parent_group;
|
|
|
|
result.values = values;
|
|
|
|
return result;
|
2015-09-28 00:10:44 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_int_action_left_default(void *data, bool wraparound)
|
2015-09-28 00:28:34 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
double min = menu_setting_get_min(setting);
|
2015-09-28 00:28:34 +00:00
|
|
|
|
2015-10-11 11:10:46 +00:00
|
|
|
if (!setting)
|
2015-11-21 15:32:22 +00:00
|
|
|
return -1;
|
2015-10-11 11:10:46 +00:00
|
|
|
|
2016-03-18 18:01:42 +00:00
|
|
|
if (*setting->value.target.integer != min)
|
|
|
|
*setting->value.target.integer =
|
|
|
|
*setting->value.target.integer - setting->step;
|
2015-09-28 00:28:34 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting->enforce_minrange)
|
|
|
|
{
|
2016-03-18 18:01:42 +00:00
|
|
|
if (*setting->value.target.integer < min)
|
|
|
|
*setting->value.target.integer = min;
|
2015-11-21 15:32:22 +00:00
|
|
|
}
|
2015-09-28 00:10:44 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
|
|
|
|
return 0;
|
2015-09-28 00:10:44 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_uint_action_left_custom_viewport_width(void *data, bool wraparound)
|
2015-09-28 00:10:44 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +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-02-14 04:42:27 +00:00
|
|
|
video_driver_ctl(RARCH_DISPLAY_CTL_VIEWPORT_INFO, &vp);
|
2015-11-21 15:32:22 +00:00
|
|
|
|
|
|
|
if (custom->width <= 1)
|
|
|
|
custom->width = 1;
|
|
|
|
else 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
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_uint_action_right_custom_viewport_width(void *data, bool wraparound)
|
2015-09-28 00:10:44 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +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-02-14 04:42:27 +00:00
|
|
|
video_driver_ctl(RARCH_DISPLAY_CTL_VIEWPORT_INFO, &vp);
|
2015-11-21 15:32:22 +00:00
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_uint_action_left_custom_viewport_height(void *data, bool wraparound)
|
2015-06-03 09:59:14 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +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
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!settings || !av_info)
|
|
|
|
return -1;
|
2015-06-03 09:59:14 +00:00
|
|
|
|
2016-02-14 04:42:27 +00:00
|
|
|
video_driver_ctl(RARCH_DISPLAY_CTL_VIEWPORT_INFO, &vp);
|
2015-06-13 17:11:18 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (custom->height <= 1)
|
|
|
|
custom->height = 1;
|
|
|
|
else if (settings->video.scale_integer)
|
|
|
|
custom->height -= geom->base_height;
|
|
|
|
else
|
|
|
|
custom->height -= 1;
|
2015-09-28 00:32:19 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
aspectratio_lut[ASPECT_RATIO_CUSTOM].value =
|
|
|
|
(float)custom->width / custom->height;
|
2015-06-13 17:11:18 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2015-06-03 09:59:14 +00:00
|
|
|
|
2015-11-21 15:32:22 +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
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!settings || !av_info)
|
|
|
|
return -1;
|
|
|
|
|
2016-02-14 04:42:27 +00:00
|
|
|
video_driver_ctl(RARCH_DISPLAY_CTL_VIEWPORT_INFO, &vp);
|
2015-11-21 15:32:22 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return 0;
|
2014-10-28 18:08:18 +00:00
|
|
|
}
|
2014-09-24 05:56:47 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_uint_action_left_default(void *data, bool wraparound)
|
2015-10-17 15:05:36 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
double min = menu_setting_get_min(setting);
|
|
|
|
|
2015-10-17 15:05:36 +00:00
|
|
|
if (!setting)
|
2015-11-21 15:32:22 +00:00
|
|
|
return -1;
|
2015-10-17 15:05:36 +00:00
|
|
|
|
2016-03-18 18:01:42 +00:00
|
|
|
if (*setting->value.target.unsigned_integer != min)
|
|
|
|
*setting->value.target.unsigned_integer =
|
|
|
|
*setting->value.target.unsigned_integer - setting->step;
|
2015-11-21 15:32:22 +00:00
|
|
|
|
|
|
|
if (setting->enforce_minrange)
|
2015-10-17 15:05:36 +00:00
|
|
|
{
|
2016-03-18 18:01:42 +00:00
|
|
|
if (*setting->value.target.unsigned_integer < min)
|
|
|
|
*setting->value.target.unsigned_integer = min;
|
2015-10-17 15:05:36 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
|
2015-10-17 15:05:36 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_uint_action_right_default(void *data, bool wraparound)
|
2014-10-28 18:08:18 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
double min = menu_setting_get_min(setting);
|
|
|
|
double max = menu_setting_get_max(setting);
|
2015-09-25 13:55:58 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!setting)
|
|
|
|
return -1;
|
2015-09-25 13:55:58 +00:00
|
|
|
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.unsigned_integer =
|
|
|
|
*setting->value.target.unsigned_integer + setting->step;
|
2015-03-22 03:56:13 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting->enforce_maxrange)
|
|
|
|
{
|
2016-03-18 18:01:42 +00:00
|
|
|
if (*setting->value.target.unsigned_integer > max)
|
2015-11-21 15:32:22 +00:00
|
|
|
{
|
|
|
|
settings_t *settings = config_get_ptr();
|
2014-09-24 05:56:47 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (settings && settings->menu.navigation.wraparound.setting_enable)
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.unsigned_integer = min;
|
2015-11-21 15:32:22 +00:00
|
|
|
else
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.unsigned_integer = max;
|
2015-11-21 15:32:22 +00:00
|
|
|
}
|
|
|
|
}
|
2015-03-17 02:28:06 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return 0;
|
2014-09-24 05:56:47 +00:00
|
|
|
}
|
2015-05-14 22:22:26 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_int_action_right_default(void *data, bool wraparound)
|
2015-10-11 12:23:32 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
double min = menu_setting_get_min(setting);
|
|
|
|
double max = menu_setting_get_max(setting);
|
|
|
|
|
2015-10-11 12:23:32 +00:00
|
|
|
if (!setting)
|
2015-11-21 15:32:22 +00:00
|
|
|
return -1;
|
2015-10-11 12:23:32 +00:00
|
|
|
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.integer =
|
|
|
|
*setting->value.target.integer + setting->step;
|
2015-11-21 15:32:22 +00:00
|
|
|
|
|
|
|
if (setting->enforce_maxrange)
|
2015-10-11 12:23:32 +00:00
|
|
|
{
|
2016-03-18 18:01:42 +00:00
|
|
|
if (*setting->value.target.integer > max)
|
2015-11-21 15:32:22 +00:00
|
|
|
{
|
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
|
|
|
if (settings && settings->menu.navigation.wraparound.setting_enable)
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.integer = min;
|
2015-11-21 15:32:22 +00:00
|
|
|
else
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.integer = max;
|
2015-11-21 15:32:22 +00:00
|
|
|
}
|
2015-10-11 12:23:32 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return 0;
|
2015-10-11 12:23:32 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_fraction_action_left_default(
|
|
|
|
void *data, bool wraparound)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
double min = menu_setting_get_min(setting);
|
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
if (!setting)
|
2015-11-21 15:32:22 +00:00
|
|
|
return -1;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.fraction =
|
|
|
|
*setting->value.target.fraction - setting->step;
|
2015-11-21 15:32:22 +00:00
|
|
|
|
|
|
|
if (setting->enforce_minrange)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2016-03-18 18:01:42 +00:00
|
|
|
if (*setting->value.target.fraction < min)
|
|
|
|
*setting->value.target.fraction = min;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_fraction_action_right_default(
|
|
|
|
void *data, bool wraparound)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
double min = menu_setting_get_min(setting);
|
|
|
|
double max = menu_setting_get_max(setting);
|
|
|
|
|
|
|
|
if (!setting)
|
2015-06-03 09:19:26 +00:00
|
|
|
return -1;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.fraction =
|
|
|
|
*setting->value.target.fraction + setting->step;
|
2015-09-26 00:22:01 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting->enforce_maxrange)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2016-03-18 18:01:42 +00:00
|
|
|
if (*setting->value.target.fraction > max)
|
2015-11-21 15:32:22 +00:00
|
|
|
{
|
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
|
|
|
if (settings && settings->menu.navigation.wraparound.setting_enable)
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.fraction = min;
|
2015-11-21 15:32:22 +00:00
|
|
|
else
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.fraction = max;
|
2015-11-21 15:32:22 +00:00
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int setting_string_action_left_driver(void *data,
|
|
|
|
bool wraparound)
|
|
|
|
{
|
2016-02-01 11:56:17 +00:00
|
|
|
driver_ctx_info_t drv;
|
2015-11-21 15:32:22 +00:00
|
|
|
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-18 19:45:01 +00:00
|
|
|
drv.s = setting->value.source.string;
|
2016-02-01 11:56:17 +00:00
|
|
|
drv.len = setting->size;
|
|
|
|
|
|
|
|
if (!driver_ctl(RARCH_DRIVER_CTL_FIND_PREV, &drv))
|
|
|
|
return -1;
|
2015-11-21 15:32:22 +00:00
|
|
|
|
2016-03-20 02:07:51 +00:00
|
|
|
if (setting->change_handler)
|
|
|
|
setting->change_handler(setting);
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
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;
|
2015-11-21 15:32:22 +00:00
|
|
|
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-18 19:45:01 +00:00
|
|
|
drv.s = setting->value.source.string;
|
2016-02-01 11:56:17 +00:00
|
|
|
drv.len = setting->size;
|
|
|
|
|
|
|
|
if (!driver_ctl(RARCH_DRIVER_CTL_FIND_NEXT, &drv))
|
2015-11-21 15:32:22 +00:00
|
|
|
{
|
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
|
|
|
if (settings && settings->menu.navigation.wraparound.setting_enable)
|
2016-02-01 11:56:17 +00:00
|
|
|
{
|
|
|
|
drv.label = setting->name;
|
2016-03-18 19:45:01 +00:00
|
|
|
drv.s = setting->value.source.string;
|
2016-02-01 11:56:17 +00:00
|
|
|
drv.len = setting->size;
|
|
|
|
driver_ctl(RARCH_DRIVER_CTL_FIND_FIRST, &drv);
|
|
|
|
}
|
2015-11-21 15:32:22 +00:00
|
|
|
}
|
2015-06-03 09:19:26 +00:00
|
|
|
|
2016-03-20 02:07:51 +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
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-11-21 15:32:22 +00:00
|
|
|
* setting_get_string_representation_st_bool:
|
2015-06-02 18:26:27 +00:00
|
|
|
* @setting : pointer to setting
|
2015-11-21 15:32:22 +00:00
|
|
|
* @s : string for the type to be represented on-screen as
|
|
|
|
* a label.
|
|
|
|
* @len : size of @s
|
2015-06-02 18:26:27 +00:00
|
|
|
*
|
2015-11-21 15:32:22 +00:00
|
|
|
* Set a settings' label value. The setting is of type ST_BOOL.
|
2015-06-02 18:26:27 +00:00
|
|
|
**/
|
2015-11-21 15:32:22 +00:00
|
|
|
static void setting_get_string_representation_st_bool(void *data,
|
|
|
|
char *s, size_t len)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting)
|
2016-03-18 18:01:42 +00:00
|
|
|
strlcpy(s, *setting->value.target.boolean ? setting->boolean.on_label :
|
2015-11-21 15:32:22 +00:00
|
|
|
setting->boolean.off_label, len);
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2015-11-21 15:32:22 +00:00
|
|
|
* setting_get_string_representation_st_float:
|
|
|
|
* @setting : pointer to setting
|
|
|
|
* @s : string for the type to be represented on-screen as
|
|
|
|
* a label.
|
|
|
|
* @len : size of @s
|
2015-06-02 18:26:27 +00:00
|
|
|
*
|
2015-11-21 15:32:22 +00:00
|
|
|
* Set a settings' label value. The setting is of type ST_FLOAT.
|
2015-06-02 18:26:27 +00:00
|
|
|
**/
|
2015-11-21 15:32:22 +00:00
|
|
|
static void setting_get_string_representation_st_float(void *data,
|
|
|
|
char *s, size_t len)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (setting)
|
|
|
|
snprintf(s, len, setting->rounding_fraction,
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.fraction);
|
2015-11-21 15:32:22 +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;
|
2015-06-06 08:44:19 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!setting)
|
|
|
|
return;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
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, menu_hash_to_str(MENU_VALUE_NOT_AVAILABLE), len);
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static void setting_get_string_representation_st_dir(void *data,
|
|
|
|
char *s, size_t len)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-10-11 12:23:32 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting)
|
|
|
|
strlcpy(s,
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.string ?
|
|
|
|
setting->value.target.string : setting->dir.empty_path,
|
2015-11-21 15:32:22 +00:00
|
|
|
len);
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static void setting_get_string_representation_st_path(void *data,
|
|
|
|
char *s, size_t len)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-10-11 12:23:32 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting)
|
2016-03-18 19:45:01 +00:00
|
|
|
fill_short_pathname_representation(s, setting->value.source.string, len);
|
2015-11-21 15:32:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void setting_get_string_representation_st_string(void *data,
|
|
|
|
char *s, size_t len)
|
2015-09-27 16:14:55 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-09-27 16:14:55 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting)
|
2016-03-18 19:45:01 +00:00
|
|
|
strlcpy(s, setting->value.source.string, len);
|
2015-11-21 15:32:22 +00:00
|
|
|
}
|
2015-09-27 16:14:55 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static void setting_get_string_representation_st_bind(void *data,
|
|
|
|
char *s, size_t len)
|
|
|
|
{
|
|
|
|
unsigned index_offset;
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
const struct retro_keybind* keybind = NULL;
|
|
|
|
const struct retro_keybind* auto_bind = NULL;
|
2015-09-27 16:14:55 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!setting)
|
|
|
|
return;
|
2015-09-27 16:14:55 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
index_offset = menu_setting_get_index_offset(setting);
|
2016-03-18 18:01:42 +00:00
|
|
|
keybind = (const struct retro_keybind*)setting->value.target.keybind;
|
2015-11-21 15:32:22 +00:00
|
|
|
auto_bind = (const struct retro_keybind*)
|
|
|
|
input_get_auto_bind(index_offset, keybind->id);
|
2015-09-27 17:19:06 +00:00
|
|
|
|
2015-11-28 15:06:14 +00:00
|
|
|
input_config_get_bind_string(s, keybind, auto_bind, len);
|
2015-09-27 16:14:55 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static void setting_get_string_representation_int(void *data,
|
|
|
|
char *s, size_t len)
|
2015-09-27 16:14:55 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-09-27 16:14:55 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting)
|
2016-03-18 18:01:42 +00:00
|
|
|
snprintf(s, len, "%d", *setting->value.target.integer);
|
2015-11-21 15:32:22 +00:00
|
|
|
}
|
2015-09-27 16:14:55 +00:00
|
|
|
|
2015-11-21 15:32:22 +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;
|
|
|
|
if (!setting)
|
|
|
|
return;
|
2015-09-27 16:14:55 +00:00
|
|
|
|
2016-03-18 18:01:42 +00:00
|
|
|
if (*setting->value.target.unsigned_integer)
|
2015-11-21 15:32:22 +00:00
|
|
|
snprintf(s, len, "%u",
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.unsigned_integer);
|
2015-09-27 16:14:55 +00:00
|
|
|
else
|
2015-11-21 15:32:22 +00:00
|
|
|
strlcpy(s, "0 (Auto)", len);
|
|
|
|
}
|
2015-09-27 16:14:55 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static void setting_get_string_representation_uint_video_rotation(void *data,
|
|
|
|
char *s, size_t len)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
if (setting)
|
2016-03-18 18:01:42 +00:00
|
|
|
strlcpy(s, rotation_lut[*setting->value.target.unsigned_integer],
|
2015-11-21 15:32:22 +00:00
|
|
|
len);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void setting_get_string_representation_uint_aspect_ratio_index(void *data,
|
|
|
|
char *s, size_t len)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
if (setting)
|
|
|
|
strlcpy(s,
|
2016-03-18 18:01:42 +00:00
|
|
|
aspectratio_lut[*setting->value.target.unsigned_integer].name,
|
2015-11-21 15:32:22 +00:00
|
|
|
len);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void setting_get_string_representation_uint_libretro_device(void *data,
|
|
|
|
char *s, size_t len)
|
|
|
|
{
|
|
|
|
unsigned index_offset;
|
|
|
|
const struct retro_controller_description *desc = NULL;
|
2015-12-10 21:30:25 +00:00
|
|
|
const char *name = NULL;
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
rarch_system_info_t *system = NULL;
|
|
|
|
|
|
|
|
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
2015-11-21 15:32:22 +00:00
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return;
|
|
|
|
|
|
|
|
index_offset = menu_setting_get_index_offset(setting);
|
|
|
|
|
2016-03-04 18:29:22 +00:00
|
|
|
if (index_offset < system->ports.size)
|
2015-11-21 15:32:22 +00:00
|
|
|
desc = libretro_find_controller_description(
|
2016-03-04 18:29:22 +00:00
|
|
|
&system->ports.data[index_offset],
|
2015-11-21 15:32:22 +00:00
|
|
|
settings->input.libretro_device
|
|
|
|
[index_offset]);
|
|
|
|
|
|
|
|
if (desc)
|
|
|
|
name = desc->desc;
|
|
|
|
|
|
|
|
if (!name)
|
|
|
|
{
|
|
|
|
/* Find generic name. */
|
|
|
|
|
|
|
|
switch (settings->input.libretro_device[index_offset])
|
|
|
|
{
|
|
|
|
case RETRO_DEVICE_NONE:
|
|
|
|
name = menu_hash_to_str(MENU_VALUE_NONE);
|
|
|
|
break;
|
|
|
|
case RETRO_DEVICE_JOYPAD:
|
|
|
|
name = menu_hash_to_str(MENU_VALUE_RETROPAD);
|
|
|
|
break;
|
|
|
|
case RETRO_DEVICE_ANALOG:
|
|
|
|
name = "RetroPad w/ Analog";
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
name = menu_hash_to_str(MENU_VALUE_UNKNOWN);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2015-09-27 17:19:06 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
strlcpy(s, name, len);
|
2015-09-27 16:14:55 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static void setting_get_string_representation_uint_analog_dpad_mode(void *data,
|
|
|
|
char *s, size_t len)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
const char *modes[3];
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
settings_t *settings = config_get_ptr();
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
modes[0] = menu_hash_to_str(MENU_VALUE_NONE);
|
|
|
|
modes[1] = menu_hash_to_str(MENU_VALUE_LEFT_ANALOG);
|
|
|
|
modes[2] = menu_hash_to_str(MENU_VALUE_RIGHT_ANALOG);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting)
|
|
|
|
{
|
|
|
|
unsigned index_offset = menu_setting_get_index_offset(setting);
|
|
|
|
strlcpy(s, modes[settings->input.analog_dpad_mode
|
|
|
|
[index_offset] % ANALOG_DPAD_LAST], len);
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
#ifdef HAVE_THREADS
|
|
|
|
static void setting_get_string_representation_uint_autosave_interval(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)
|
2015-11-21 15:32:22 +00:00
|
|
|
return;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-03-18 18:01:42 +00:00
|
|
|
if (*setting->value.target.unsigned_integer)
|
2015-11-21 15:32:22 +00:00
|
|
|
snprintf(s, len, "%u %s",
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.unsigned_integer, menu_hash_to_str(MENU_VALUE_SECONDS));
|
2015-11-21 15:32:22 +00:00
|
|
|
else
|
|
|
|
strlcpy(s, menu_hash_to_str(MENU_VALUE_OFF), len);
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
2015-11-21 15:32:22 +00:00
|
|
|
#endif
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static void setting_get_string_representation_uint_user_language(void *data,
|
|
|
|
char *s, size_t len)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
const char *modes[RETRO_LANGUAGE_LAST];
|
|
|
|
settings_t *settings = config_get_ptr();
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
modes[RETRO_LANGUAGE_ENGLISH] = menu_hash_to_str(MENU_VALUE_LANG_ENGLISH);
|
|
|
|
modes[RETRO_LANGUAGE_JAPANESE] = menu_hash_to_str(MENU_VALUE_LANG_JAPANESE);
|
|
|
|
modes[RETRO_LANGUAGE_FRENCH] = menu_hash_to_str(MENU_VALUE_LANG_FRENCH);
|
|
|
|
modes[RETRO_LANGUAGE_SPANISH] = menu_hash_to_str(MENU_VALUE_LANG_SPANISH);
|
|
|
|
modes[RETRO_LANGUAGE_GERMAN] = menu_hash_to_str(MENU_VALUE_LANG_GERMAN);
|
|
|
|
modes[RETRO_LANGUAGE_ITALIAN] = menu_hash_to_str(MENU_VALUE_LANG_ITALIAN);
|
|
|
|
modes[RETRO_LANGUAGE_DUTCH] = menu_hash_to_str(MENU_VALUE_LANG_DUTCH);
|
|
|
|
modes[RETRO_LANGUAGE_PORTUGUESE] = menu_hash_to_str(MENU_VALUE_LANG_PORTUGUESE);
|
|
|
|
modes[RETRO_LANGUAGE_RUSSIAN] = menu_hash_to_str(MENU_VALUE_LANG_RUSSIAN);
|
|
|
|
modes[RETRO_LANGUAGE_KOREAN] = menu_hash_to_str(MENU_VALUE_LANG_KOREAN);
|
|
|
|
modes[RETRO_LANGUAGE_CHINESE_TRADITIONAL] = menu_hash_to_str(MENU_VALUE_LANG_CHINESE_TRADITIONAL);
|
|
|
|
modes[RETRO_LANGUAGE_CHINESE_SIMPLIFIED] = menu_hash_to_str(MENU_VALUE_LANG_CHINESE_SIMPLIFIED);
|
|
|
|
modes[RETRO_LANGUAGE_ESPERANTO] = menu_hash_to_str(MENU_VALUE_LANG_ESPERANTO);
|
|
|
|
modes[RETRO_LANGUAGE_POLISH] = menu_hash_to_str(MENU_VALUE_LANG_POLISH);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (settings)
|
|
|
|
strlcpy(s, modes[settings->user_language], len);
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static void setting_get_string_representation_uint_libretro_log_level(void *data,
|
|
|
|
char *s, size_t len)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
static const char *modes[] = {
|
|
|
|
"0 (Debug)",
|
|
|
|
"1 (Info)",
|
|
|
|
"2 (Warning)",
|
|
|
|
"3 (Error)"
|
|
|
|
};
|
2016-03-18 18:01:42 +00:00
|
|
|
strlcpy(s, modes[*setting->value.target.unsigned_integer],
|
2015-11-21 15:32:22 +00:00
|
|
|
len);
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static void setting_get_string_representation_uint(void *data,
|
|
|
|
char *s, size_t len)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
if (setting)
|
|
|
|
snprintf(s, len, "%u",
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.unsigned_integer);
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static void setting_get_string_representation_hex(void *data,
|
|
|
|
char *s, size_t len)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting)
|
|
|
|
snprintf(s, len, "%08x",
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.unsigned_integer);
|
2015-11-21 15:32:22 +00:00
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/**
|
|
|
|
* setting_reset_setting:
|
|
|
|
* @setting : pointer to setting
|
|
|
|
*
|
|
|
|
* Reset a setting's value to its defaults.
|
|
|
|
**/
|
|
|
|
static void setting_reset_setting(rarch_setting_t* setting)
|
|
|
|
{
|
2015-06-02 18:26:27 +00:00
|
|
|
if (!setting)
|
2015-11-21 15:32:22 +00:00
|
|
|
return;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
switch (menu_setting_get_type(setting))
|
|
|
|
{
|
|
|
|
case ST_BOOL:
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.boolean = setting->default_value.boolean;
|
2015-11-21 15:32:22 +00:00
|
|
|
break;
|
|
|
|
case ST_INT:
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.integer = setting->default_value.integer;
|
2015-11-21 15:32:22 +00:00
|
|
|
break;
|
|
|
|
case ST_UINT:
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.unsigned_integer = setting->default_value.unsigned_integer;
|
2015-11-21 15:32:22 +00:00
|
|
|
break;
|
|
|
|
case ST_FLOAT:
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.fraction = setting->default_value.fraction;
|
2015-11-21 15:32:22 +00:00
|
|
|
break;
|
|
|
|
case ST_BIND:
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.keybind = *setting->default_value.keybind;
|
2015-11-21 15:32:22 +00:00
|
|
|
break;
|
|
|
|
case ST_STRING:
|
|
|
|
case ST_STRING_OPTIONS:
|
|
|
|
case ST_PATH:
|
|
|
|
case ST_DIR:
|
|
|
|
if (setting->default_value.string)
|
|
|
|
{
|
|
|
|
if (menu_setting_get_type(setting) == ST_STRING)
|
|
|
|
menu_setting_set_with_string_representation(setting, setting->default_value.string);
|
|
|
|
else
|
2016-03-18 19:45:01 +00:00
|
|
|
fill_pathname_expand_special(setting->value.source.string,
|
2015-11-21 15:32:22 +00:00
|
|
|
setting->default_value.string, setting->size);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting->change_handler)
|
|
|
|
setting->change_handler(setting);
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
enum setting_type menu_setting_get_type(rarch_setting_t *setting)
|
2015-10-11 12:23:32 +00:00
|
|
|
{
|
|
|
|
if (!setting)
|
2015-11-21 15:32:22 +00:00
|
|
|
return ST_NONE;
|
|
|
|
return setting->type;
|
2015-10-11 12:23:32 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
enum setting_type menu_setting_get_browser_selection_type(rarch_setting_t *setting)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
|
|
|
if (!setting)
|
2015-11-21 15:32:22 +00:00
|
|
|
return ST_NONE;
|
|
|
|
return setting->browser_selection_type;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static void menu_settings_info_list_free(rarch_setting_info_t *list_info)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
if (list_info)
|
|
|
|
free(list_info);
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
void menu_settings_list_increment(rarch_setting_t **list)
|
|
|
|
{
|
|
|
|
if (!list || !*list)
|
|
|
|
return;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
*list = *list + 1;
|
|
|
|
}
|
2015-06-05 18:04:19 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static void setting_get_string_representation_default(void *data,
|
|
|
|
char *s, size_t len)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
strlcpy(s, "...", len);
|
2015-06-05 18:04:19 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_generic_action_start_default(void *data)
|
2015-06-05 18:04:19 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-06-05 18:04:19 +00:00
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
setting_reset_setting(setting);
|
2015-06-05 18:04:19 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2016-02-14 03:33:42 +00:00
|
|
|
static int setting_bool_action_ok_default(void *data, bool wraparound)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
menu_setting_set_with_string_representation(setting,
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.boolean ? "false" : "true");
|
2016-02-14 03:33:42 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_bool_action_toggle_default(void *data, bool wraparound)
|
2015-06-05 18:04:19 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-06-05 18:04:19 +00:00
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
2015-12-16 02:14:10 +00:00
|
|
|
menu_setting_set_with_string_representation(setting,
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.boolean ? "false" : "true");
|
2015-12-16 02:14:10 +00:00
|
|
|
|
|
|
|
return 0;
|
2015-11-21 15:32:22 +00:00
|
|
|
}
|
2015-06-05 18:04:19 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_generic_action_ok_default(void *data, bool wraparound)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-06-06 08:44:19 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!setting)
|
|
|
|
return -1;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
(void)wraparound;
|
2015-06-05 18:04:19 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting->cmd_trigger.idx != EVENT_CMD_NONE)
|
|
|
|
setting->cmd_trigger.triggered = true;
|
2015-06-05 18:04:19 +00:00
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/**
|
|
|
|
* setting_subgroup_setting:
|
|
|
|
* @type : type of settting.
|
|
|
|
* @name : name of setting.
|
|
|
|
* @parent_name : group that the subgroup setting belongs to.
|
|
|
|
*
|
|
|
|
* Initializes a setting of type ST_SUBGROUP.
|
|
|
|
*
|
|
|
|
* Returns: setting of type ST_SUBGROUP.
|
|
|
|
**/
|
|
|
|
static rarch_setting_t setting_subgroup_setting(enum setting_type type,
|
|
|
|
const char* name, const char *parent_name, const char *parent_group)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t result = {ST_NONE};
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.type = type;
|
|
|
|
result.name = name;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.short_description = name;
|
|
|
|
result.group = parent_name;
|
|
|
|
result.parent_group = parent_group;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.get_string_representation = &setting_get_string_representation_default;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return result;
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static bool menu_settings_list_append(rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info, rarch_setting_t value)
|
|
|
|
{
|
|
|
|
if (!list || !*list || !list_info)
|
|
|
|
return false;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (list_info->index == list_info->size)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
list_info->size *= 2;
|
|
|
|
*list = (rarch_setting_t*)
|
|
|
|
realloc(*list, sizeof(rarch_setting_t) * list_info->size);
|
|
|
|
if (!*list)
|
|
|
|
return false;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
value.name_hash = value.name ? menu_hash_calculate(value.name) : 0;
|
2015-06-06 08:44:19 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
(*list)[list_info->index++] = value;
|
|
|
|
return true;
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
bool START_GROUP(rarch_setting_t **list, rarch_setting_info_t *list_info,
|
|
|
|
rarch_setting_group_info_t *group_info,
|
|
|
|
const char *name, const char *parent_group)
|
|
|
|
{
|
|
|
|
group_info->name = name;
|
|
|
|
if (!(menu_settings_list_append(list, list_info, setting_group_setting (ST_GROUP, name, parent_group))))
|
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
bool END_GROUP(rarch_setting_t **list, rarch_setting_info_t *list_info,
|
|
|
|
const char *parent_group)
|
|
|
|
{
|
|
|
|
if (!(menu_settings_list_append(list, list_info, setting_group_setting (ST_END_GROUP, 0, parent_group))))
|
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
bool START_SUB_GROUP(rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info, const char *name,
|
|
|
|
rarch_setting_group_info_t *group_info,
|
|
|
|
rarch_setting_group_info_t *subgroup_info,
|
|
|
|
const char *parent_group)
|
|
|
|
{
|
2015-11-25 03:05:04 +00:00
|
|
|
rarch_setting_t value;
|
2015-11-21 15:32:22 +00:00
|
|
|
subgroup_info->name = name;
|
2015-11-25 03:05:04 +00:00
|
|
|
value = setting_subgroup_setting (ST_SUB_GROUP, name, group_info->name, parent_group);
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!(menu_settings_list_append(list, list_info, value)))
|
|
|
|
return false;
|
|
|
|
return true;
|
2015-06-05 18:04:19 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
bool END_SUB_GROUP(
|
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
const char *parent_group)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!(menu_settings_list_append(list, list_info,
|
|
|
|
setting_group_setting (ST_END_SUB_GROUP, 0, parent_group))))
|
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
bool CONFIG_ACTION(
|
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
const char *name, const char *SHORT,
|
|
|
|
rarch_setting_group_info_t *group_info,
|
|
|
|
rarch_setting_group_info_t *subgroup_info,
|
|
|
|
const char *parent_group)
|
|
|
|
{
|
|
|
|
if (!menu_settings_list_append(list, list_info,
|
|
|
|
setting_action_setting(name, SHORT, group_info->name, subgroup_info->name, parent_group)))
|
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/**
|
|
|
|
* setting_bool_setting:
|
|
|
|
* @name : name of setting.
|
|
|
|
* @short_description : Short description of setting.
|
|
|
|
* @target : Target of bool setting.
|
|
|
|
* @default_value : Default value (in bool format).
|
|
|
|
* @off : String value for "Off" label.
|
|
|
|
* @on : String value for "On" label.
|
|
|
|
* @group : Group that the setting belongs to.
|
|
|
|
* @subgroup : Subgroup that the setting belongs to.
|
|
|
|
* @change_handler : Function callback for change handler function pointer.
|
|
|
|
* @read_handler : Function callback for read handler function pointer.
|
|
|
|
*
|
|
|
|
* Initializes a setting of type ST_BOOL.
|
|
|
|
*
|
|
|
|
* Returns: setting of type ST_BOOL.
|
|
|
|
**/
|
|
|
|
static rarch_setting_t setting_bool_setting(const char* name,
|
|
|
|
const char* short_description, bool* target, bool default_value,
|
|
|
|
const char *off, const char *on,
|
|
|
|
const char *group, const char *subgroup, const char *parent_group,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
|
|
|
{
|
|
|
|
rarch_setting_t result = {ST_NONE};
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.type = ST_BOOL;
|
|
|
|
result.name = name;
|
|
|
|
result.size = sizeof(bool);
|
|
|
|
result.short_description = short_description;
|
|
|
|
result.group = group;
|
|
|
|
result.subgroup = subgroup;
|
|
|
|
result.parent_group = parent_group;
|
2015-10-11 12:23:32 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.change_handler = change_handler;
|
|
|
|
result.read_handler = read_handler;
|
2016-03-18 18:01:42 +00:00
|
|
|
result.value.target.boolean = target;
|
2015-11-21 15:32:22 +00:00
|
|
|
result.original_value.boolean = *target;
|
|
|
|
result.default_value.boolean = default_value;
|
|
|
|
result.boolean.off_label = off;
|
|
|
|
result.boolean.on_label = on;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.action_start = setting_generic_action_start_default;
|
|
|
|
result.action_left = setting_bool_action_toggle_default;
|
|
|
|
result.action_right = setting_bool_action_toggle_default;
|
2016-02-14 03:33:42 +00:00
|
|
|
result.action_ok = setting_bool_action_ok_default;
|
2015-11-21 15:32:22 +00:00
|
|
|
result.action_select = setting_generic_action_ok_default;
|
|
|
|
result.action_cancel = NULL;
|
2015-06-05 18:04:19 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.get_string_representation = &setting_get_string_representation_st_bool;
|
|
|
|
return result;
|
2015-06-05 18:04:19 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/**
|
|
|
|
* setting_int_setting:
|
|
|
|
* @name : name of setting.
|
|
|
|
* @short_description : Short description of setting.
|
|
|
|
* @target : Target of signed integer setting.
|
|
|
|
* @default_value : Default value (in signed integer format).
|
|
|
|
* @group : Group that the setting belongs to.
|
|
|
|
* @subgroup : Subgroup that the setting belongs to.
|
|
|
|
* @change_handler : Function callback for change handler function pointer.
|
|
|
|
* @read_handler : Function callback for read handler function pointer.
|
|
|
|
*
|
|
|
|
* Initializes a setting of type ST_INT.
|
|
|
|
*
|
|
|
|
* Returns: setting of type ST_INT.
|
|
|
|
**/
|
|
|
|
static rarch_setting_t setting_int_setting(const char* name,
|
|
|
|
const char* short_description, int* target,
|
|
|
|
int default_value,
|
|
|
|
const char *group, const char *subgroup, const char *parent_group,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
2015-06-05 18:04:19 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t result = {ST_NONE};
|
2015-06-05 18:04:19 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.type = ST_INT;
|
|
|
|
result.name = name;
|
|
|
|
result.size = sizeof(int);
|
|
|
|
result.short_description = short_description;
|
|
|
|
result.group = group;
|
|
|
|
result.subgroup = subgroup;
|
|
|
|
result.parent_group = parent_group;
|
2015-10-11 12:23:32 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.change_handler = change_handler;
|
|
|
|
result.read_handler = read_handler;
|
2016-03-18 18:01:42 +00:00
|
|
|
result.value.target.integer = target;
|
2015-11-21 15:32:22 +00:00
|
|
|
result.original_value.integer = *target;
|
|
|
|
result.default_value.integer = default_value;
|
2015-06-05 18:04:19 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
result.action_start = setting_generic_action_start_default;
|
|
|
|
result.action_left = setting_int_action_left_default;
|
|
|
|
result.action_right = setting_int_action_right_default;
|
|
|
|
result.action_ok = setting_generic_action_ok_default;
|
|
|
|
result.action_select = setting_generic_action_ok_default;
|
|
|
|
result.action_cancel = NULL;
|
|
|
|
result.get_string_representation = &setting_get_string_representation_int;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return result;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
bool CONFIG_BOOL(
|
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
bool *target,
|
|
|
|
const char *name, const char *SHORT,
|
|
|
|
bool default_value,
|
|
|
|
const char *off, const char *on,
|
|
|
|
rarch_setting_group_info_t *group_info,
|
|
|
|
rarch_setting_group_info_t *subgroup_info,
|
|
|
|
const char *parent_group,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!menu_settings_list_append(list, list_info,
|
|
|
|
setting_bool_setting (name, SHORT, target, default_value, off, on,
|
|
|
|
group_info->name, subgroup_info->name, parent_group, change_handler, read_handler)))
|
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
bool CONFIG_INT(
|
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
int *target,
|
|
|
|
const char *name, const char *SHORT,
|
|
|
|
int default_value,
|
|
|
|
rarch_setting_group_info_t *group_info,
|
|
|
|
rarch_setting_group_info_t *subgroup_info,
|
|
|
|
const char *parent_group,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
|
|
|
{
|
|
|
|
if (!(menu_settings_list_append(list, list_info,
|
|
|
|
setting_int_setting (name, SHORT, target, default_value,
|
|
|
|
group_info->name, subgroup_info->name, parent_group, change_handler, read_handler))))
|
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
bool CONFIG_UINT(
|
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
unsigned int *target,
|
|
|
|
const char *name, const char *SHORT,
|
|
|
|
unsigned int default_value,
|
|
|
|
rarch_setting_group_info_t *group_info,
|
|
|
|
rarch_setting_group_info_t *subgroup_info,
|
|
|
|
const char *parent_group,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
|
|
|
{
|
|
|
|
rarch_setting_t value = setting_uint_setting (name, SHORT, target, default_value,
|
|
|
|
group_info->name,
|
|
|
|
subgroup_info->name, parent_group, change_handler, read_handler);
|
|
|
|
if (!(menu_settings_list_append(list, list_info, value)))
|
|
|
|
return false;
|
|
|
|
return true;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
bool CONFIG_FLOAT(
|
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
float *target,
|
|
|
|
const char *name, const char *SHORT,
|
|
|
|
float default_value, const char *rounding,
|
|
|
|
rarch_setting_group_info_t *group_info,
|
|
|
|
rarch_setting_group_info_t *subgroup_info,
|
|
|
|
const char *parent_group,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
2015-09-27 15:49:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!(menu_settings_list_append(list, list_info,
|
|
|
|
setting_float_setting (name, SHORT, target, default_value, rounding,
|
|
|
|
group_info->name, subgroup_info->name, parent_group, change_handler, read_handler))))
|
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
}
|
2015-09-27 15:49:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
bool CONFIG_PATH(
|
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
char *target, size_t len,
|
|
|
|
const char *name, const char *SHORT,
|
|
|
|
const char *default_value,
|
|
|
|
rarch_setting_group_info_t *group_info,
|
|
|
|
rarch_setting_group_info_t *subgroup_info,
|
|
|
|
const char *parent_group,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
|
|
|
{
|
|
|
|
if (!(menu_settings_list_append(list, list_info,
|
|
|
|
setting_string_setting(ST_PATH, name, SHORT, target, len, default_value, "",
|
|
|
|
group_info->name, subgroup_info->name, parent_group, change_handler, read_handler))))
|
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
}
|
2015-09-27 15:49:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
bool CONFIG_DIR(
|
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
char *target, size_t len,
|
|
|
|
const char *name, const char *SHORT,
|
|
|
|
const char *default_value, const char *empty,
|
|
|
|
rarch_setting_group_info_t *group_info,
|
|
|
|
rarch_setting_group_info_t *subgroup_info,
|
|
|
|
const char *parent_group,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
|
|
|
{
|
|
|
|
if (!(menu_settings_list_append(list, list_info,
|
|
|
|
setting_string_setting(ST_DIR, name, SHORT, target, len, default_value, empty,
|
|
|
|
group_info->name, subgroup_info->name, parent_group, change_handler, read_handler))))
|
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
}
|
2015-09-27 15:49:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
bool CONFIG_STRING(
|
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
char *target, size_t len,
|
|
|
|
const char *name, const char *SHORT,
|
|
|
|
const char *default_value,
|
|
|
|
rarch_setting_group_info_t *group_info,
|
|
|
|
rarch_setting_group_info_t *subgroup_info,
|
|
|
|
const char *parent_group,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
|
|
|
{
|
|
|
|
if (!(menu_settings_list_append(list, list_info,
|
|
|
|
setting_string_setting(ST_STRING, name, SHORT, target, len, default_value, "",
|
|
|
|
group_info->name, subgroup_info->name, parent_group, change_handler, read_handler))))
|
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
}
|
2015-09-27 15:49:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
bool CONFIG_STRING_OPTIONS(
|
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
char *target, size_t len,
|
|
|
|
const char *name, const char *SHORT,
|
|
|
|
const char *default_value, const char *values,
|
|
|
|
rarch_setting_group_info_t *group_info,
|
|
|
|
rarch_setting_group_info_t *subgroup_info,
|
|
|
|
const char *parent_group,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
|
|
|
{
|
|
|
|
if (!(menu_settings_list_append(list, list_info,
|
|
|
|
setting_string_setting_options(ST_STRING_OPTIONS, name, SHORT, target, len, default_value, "", values,
|
|
|
|
group_info->name, subgroup_info->name, parent_group, change_handler, read_handler))))
|
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
}
|
2015-09-27 15:49:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
bool CONFIG_HEX(
|
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
unsigned int *target,
|
|
|
|
const char *name, const char *SHORT,
|
|
|
|
unsigned int default_value,
|
|
|
|
rarch_setting_group_info_t *group_info,
|
|
|
|
rarch_setting_group_info_t *subgroup_info,
|
|
|
|
const char *parent_group,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
|
|
|
{
|
|
|
|
rarch_setting_t value = setting_hex_setting(name, SHORT, target, default_value,
|
|
|
|
group_info->name, subgroup_info->name, parent_group, change_handler, read_handler);
|
|
|
|
if (!(menu_settings_list_append(list, list_info, value)))
|
|
|
|
return false;
|
|
|
|
return true;
|
2015-09-27 15:49:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/* Please strdup() NAME and SHORT */
|
|
|
|
bool CONFIG_BIND(
|
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
struct retro_keybind *target,
|
|
|
|
uint32_t player, uint32_t player_offset,
|
|
|
|
const char *name, const char *SHORT,
|
|
|
|
const struct retro_keybind *default_value,
|
|
|
|
rarch_setting_group_info_t *group_info,
|
|
|
|
rarch_setting_group_info_t *subgroup_info,
|
|
|
|
const char *parent_group)
|
2015-09-27 16:14:55 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!(menu_settings_list_append(list, list_info,
|
|
|
|
setting_bind_setting(name, SHORT, target, player, player_offset, default_value,
|
|
|
|
group_info->name, subgroup_info->name, parent_group))))
|
|
|
|
return false;
|
|
|
|
return true;
|
|
|
|
}
|
2015-09-27 16:14:55 +00:00
|
|
|
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
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;
|
2015-09-27 16:14:55 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
(*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;
|
2015-09-27 16:14:55 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
(*list)[list_info->index - 1].flags |= SD_FLAG_HAS_RANGE;
|
|
|
|
}
|
2015-09-27 17:19:06 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
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;
|
2015-09-27 16:14:55 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
void menu_settings_list_current_add_cmd(
|
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
enum event_command values)
|
2015-09-27 16:14:55 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
unsigned idx = list_info->index - 1;
|
|
|
|
(*list)[idx].cmd_trigger.idx = values;
|
|
|
|
}
|
2015-09-27 16:14:55 +00:00
|
|
|
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
int menu_setting_generic(rarch_setting_t *setting, bool wraparound)
|
|
|
|
{
|
|
|
|
uint64_t flags = menu_setting_get_flags(setting);
|
|
|
|
if (setting_generic_action_ok_default(setting, wraparound) != 0)
|
|
|
|
return -1;
|
2015-09-27 16:14:55 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting->change_handler)
|
|
|
|
setting->change_handler(setting);
|
2015-09-27 16:14:55 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if ((flags & SD_FLAG_EXIT) && setting->cmd_trigger.triggered)
|
|
|
|
{
|
|
|
|
setting->cmd_trigger.triggered = false;
|
|
|
|
return -1;
|
|
|
|
}
|
2015-09-27 17:19:06 +00:00
|
|
|
|
2015-09-27 16:14:55 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_handler(rarch_setting_t *setting, unsigned action)
|
2015-09-27 16:14:55 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!setting)
|
2015-09-27 16:14:55 +00:00
|
|
|
return -1;
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
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)
|
|
|
|
return setting->action_left(setting, false);
|
|
|
|
break;
|
|
|
|
case MENU_ACTION_RIGHT:
|
|
|
|
if (setting->action_right)
|
|
|
|
return setting->action_right(setting, false);
|
|
|
|
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;
|
|
|
|
}
|
2015-09-27 17:19:06 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return -1;
|
2015-09-27 16:14:55 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
int menu_action_handle_setting(rarch_setting_t *setting,
|
|
|
|
unsigned type, unsigned action, bool wraparound)
|
2015-09-27 16:14:55 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
const char *name;
|
|
|
|
menu_displaylist_info_t info = {0};
|
2015-09-27 16:14:55 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!setting)
|
2015-09-27 16:14:55 +00:00
|
|
|
return -1;
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
name = menu_setting_get_name(setting);
|
2015-09-27 16:14:55 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
switch (menu_setting_get_type(setting))
|
|
|
|
{
|
|
|
|
case ST_PATH:
|
|
|
|
if (action == MENU_ACTION_OK)
|
|
|
|
{
|
|
|
|
size_t selection;
|
|
|
|
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
2015-09-27 16:14:55 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
|
|
|
|
return -1;
|
2015-09-27 17:19:06 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
info.list = menu_stack;
|
|
|
|
info.directory_ptr = selection;
|
|
|
|
info.type = type;
|
|
|
|
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);
|
2015-11-21 15:32:22 +00:00
|
|
|
}
|
|
|
|
/* 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:
|
2015-12-16 02:14:10 +00:00
|
|
|
if (setting_handler(setting, action) == 0)
|
2015-11-21 15:32:22 +00:00
|
|
|
return menu_setting_generic(setting, wraparound);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return -1;
|
2015-09-27 16:14:55 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
const char *menu_setting_get_values(rarch_setting_t *setting)
|
|
|
|
{
|
2015-06-02 18:26:27 +00:00
|
|
|
if (!setting)
|
2015-11-21 15:32:22 +00:00
|
|
|
return NULL;
|
|
|
|
return setting->values;
|
|
|
|
}
|
2015-08-17 14:24:46 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
const char *menu_setting_get_name(rarch_setting_t *setting)
|
|
|
|
{
|
|
|
|
if (!setting)
|
|
|
|
return NULL;
|
|
|
|
return setting->name;
|
2015-06-05 18:04:19 +00:00
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
const char *menu_setting_get_parent_group(rarch_setting_t *setting)
|
2015-06-05 18:04:19 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!setting)
|
|
|
|
return NULL;
|
|
|
|
return setting->parent_group;
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
const char *menu_setting_get_short_description(rarch_setting_t *setting)
|
|
|
|
{
|
2015-06-05 18:04:19 +00:00
|
|
|
if (!setting)
|
2015-11-21 15:32:22 +00:00
|
|
|
return NULL;
|
|
|
|
return setting->short_description;
|
|
|
|
}
|
2015-06-05 18:04:19 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
uint64_t menu_setting_get_flags(rarch_setting_t *setting)
|
|
|
|
{
|
|
|
|
if (!setting)
|
|
|
|
return 0;
|
|
|
|
return setting->flags;
|
|
|
|
}
|
2015-06-05 18:04:19 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
double menu_setting_get_min(rarch_setting_t *setting)
|
|
|
|
{
|
|
|
|
if (!setting)
|
|
|
|
return 0.0f;
|
|
|
|
return setting->min;
|
|
|
|
}
|
2015-07-04 17:58:43 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
double menu_setting_get_max(rarch_setting_t *setting)
|
|
|
|
{
|
|
|
|
if (!setting)
|
|
|
|
return 0.0f;
|
|
|
|
return setting->max;
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
uint32_t menu_setting_get_index(rarch_setting_t *setting)
|
|
|
|
{
|
|
|
|
if (!setting)
|
|
|
|
return 0;
|
|
|
|
return setting->index;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +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)
|
2015-09-27 15:49:27 +00:00
|
|
|
{
|
2015-12-11 21:30:19 +00:00
|
|
|
rarch_setting_t *setting = NULL;
|
|
|
|
uint32_t needle = 0;
|
|
|
|
|
|
|
|
menu_entries_ctl(MENU_ENTRIES_CTL_SETTINGS_GET, &setting);
|
2015-09-27 15:49:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!setting || !label)
|
|
|
|
return NULL;
|
2015-09-27 15:49:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
needle = menu_hash_calculate(label);
|
2015-09-27 15:49:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
for (; menu_setting_get_type(setting) != ST_NONE; menu_settings_list_increment(&setting))
|
2015-09-27 15:49:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
const char *name = menu_setting_get_name(setting);
|
|
|
|
const char *short_description = menu_setting_get_short_description(setting);
|
|
|
|
|
|
|
|
if (needle == setting->name_hash && menu_setting_get_type(setting) <= ST_GROUP)
|
2015-09-27 15:49:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
/* make sure this isn't a collision */
|
2016-01-20 03:54:17 +00:00
|
|
|
if (!string_is_equal(label, name))
|
2015-11-21 15:32:22 +00:00
|
|
|
continue;
|
2015-09-27 15:49:27 +00:00
|
|
|
|
2015-12-26 06:37:44 +00:00
|
|
|
if (string_is_empty(short_description))
|
2015-11-21 15:32:22 +00:00
|
|
|
return NULL;
|
|
|
|
|
|
|
|
if (setting->read_handler)
|
|
|
|
setting->read_handler(setting);
|
|
|
|
|
|
|
|
return setting;
|
2015-09-27 15:49:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return NULL;
|
2015-09-27 15:49:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
int menu_setting_set_flags(rarch_setting_t *setting)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
|
|
|
if (!setting)
|
2015-11-21 15:32:22 +00:00
|
|
|
return 0;
|
2015-06-05 18:04:19 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
switch (menu_setting_get_type(setting))
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
case ST_STRING_OPTIONS:
|
|
|
|
return MENU_SETTING_STRING_OPTIONS;
|
|
|
|
case ST_ACTION:
|
|
|
|
return MENU_SETTING_ACTION;
|
|
|
|
case ST_PATH:
|
|
|
|
return MENU_FILE_PATH;
|
|
|
|
case ST_GROUP:
|
|
|
|
return MENU_SETTING_GROUP;
|
|
|
|
case ST_SUB_GROUP:
|
|
|
|
return MENU_SETTING_SUBGROUP;
|
|
|
|
default:
|
|
|
|
break;
|
2015-06-05 18:04:19 +00:00
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-05 18:04:19 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
int menu_setting_set(unsigned type, const char *label,
|
|
|
|
unsigned action, bool wraparound)
|
2015-06-05 18:04:19 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
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
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
|
|
|
|
return 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
cbs = menu_entries_get_actiondata_at_offset(selection_buf, selection);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!cbs)
|
|
|
|
return 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
ret = menu_action_handle_setting(cbs->setting,
|
|
|
|
type, action, wraparound);
|
2015-06-05 18:04:19 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (ret == -1)
|
|
|
|
return 0;
|
|
|
|
return ret;
|
2015-06-05 18:04:19 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
void *setting_get_ptr(rarch_setting_t *setting)
|
2015-06-05 18:04:19 +00:00
|
|
|
{
|
|
|
|
if (!setting)
|
2015-11-21 15:32:22 +00:00
|
|
|
return NULL;
|
2015-06-05 18:04:19 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
switch (menu_setting_get_type(setting))
|
2015-06-05 18:04:19 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
case ST_BOOL:
|
2016-03-18 18:01:42 +00:00
|
|
|
return setting->value.target.boolean;
|
2015-11-21 15:32:22 +00:00
|
|
|
case ST_INT:
|
2016-03-18 18:01:42 +00:00
|
|
|
return setting->value.target.integer;
|
2015-11-21 15:32:22 +00:00
|
|
|
case ST_UINT:
|
2016-03-18 18:01:42 +00:00
|
|
|
return setting->value.target.unsigned_integer;
|
2015-11-21 15:32:22 +00:00
|
|
|
case ST_FLOAT:
|
2016-03-18 18:01:42 +00:00
|
|
|
return setting->value.target.fraction;
|
2015-11-21 15:32:22 +00:00
|
|
|
case ST_BIND:
|
2016-03-18 18:01:42 +00:00
|
|
|
return setting->value.target.keybind;
|
2015-11-21 15:32:22 +00:00
|
|
|
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;
|
2015-11-21 15:32:22 +00:00
|
|
|
default:
|
|
|
|
break;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return NULL;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-06-06 14:26:55 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/**
|
|
|
|
* menu_setting_set_with_string_representation:
|
|
|
|
* @setting : pointer to setting
|
|
|
|
* @value : value for the setting (string)
|
|
|
|
*
|
|
|
|
* Set a settings' value with a string. It is assumed
|
|
|
|
* that the string has been properly formatted.
|
|
|
|
**/
|
|
|
|
int menu_setting_set_with_string_representation(rarch_setting_t* setting,
|
|
|
|
const char* value)
|
|
|
|
{
|
|
|
|
double min, max;
|
|
|
|
uint64_t flags = menu_setting_get_flags(setting);
|
|
|
|
if (!setting || !value)
|
2015-06-02 18:26:27 +00:00
|
|
|
return -1;
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
min = menu_setting_get_min(setting);
|
|
|
|
max = menu_setting_get_max(setting);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
switch (menu_setting_get_type(setting))
|
|
|
|
{
|
|
|
|
case ST_INT:
|
2016-03-18 18:01:42 +00:00
|
|
|
sscanf(value, "%d", setting->value.target.integer);
|
2015-11-21 15:32:22 +00:00
|
|
|
if (flags & SD_FLAG_HAS_RANGE)
|
|
|
|
{
|
2016-03-18 18:01:42 +00:00
|
|
|
if (setting->enforce_minrange && *setting->value.target.integer < min)
|
|
|
|
*setting->value.target.integer = min;
|
|
|
|
if (setting->enforce_maxrange && *setting->value.target.integer > max)
|
2015-11-21 15:32:22 +00:00
|
|
|
{
|
|
|
|
settings_t *settings = config_get_ptr();
|
2015-07-11 03:05:59 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (settings && settings->menu.navigation.wraparound.setting_enable)
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.integer = min;
|
2015-11-21 15:32:22 +00:00
|
|
|
else
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.integer = max;
|
2015-11-21 15:32:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case ST_UINT:
|
2016-03-18 18:01:42 +00:00
|
|
|
sscanf(value, "%u", setting->value.target.unsigned_integer);
|
2015-11-21 15:32:22 +00:00
|
|
|
if (flags & SD_FLAG_HAS_RANGE)
|
|
|
|
{
|
2016-03-18 18:01:42 +00:00
|
|
|
if (setting->enforce_minrange && *setting->value.target.unsigned_integer < min)
|
|
|
|
*setting->value.target.unsigned_integer = min;
|
|
|
|
if (setting->enforce_maxrange && *setting->value.target.unsigned_integer > max)
|
2015-11-21 15:32:22 +00:00
|
|
|
{
|
|
|
|
settings_t *settings = config_get_ptr();
|
2015-07-11 03:05:59 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (settings && settings->menu.navigation.wraparound.setting_enable)
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.unsigned_integer = min;
|
2015-11-21 15:32:22 +00:00
|
|
|
else
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.unsigned_integer = max;
|
2015-11-21 15:32:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case ST_FLOAT:
|
2016-03-18 18:01:42 +00:00
|
|
|
sscanf(value, "%f", setting->value.target.fraction);
|
2015-11-21 15:32:22 +00:00
|
|
|
if (flags & SD_FLAG_HAS_RANGE)
|
|
|
|
{
|
2016-03-18 18:01:42 +00:00
|
|
|
if (setting->enforce_minrange && *setting->value.target.fraction < min)
|
|
|
|
*setting->value.target.fraction = min;
|
|
|
|
if (setting->enforce_maxrange && *setting->value.target.fraction > max)
|
2015-11-21 15:32:22 +00:00
|
|
|
{
|
|
|
|
settings_t *settings = config_get_ptr();
|
2015-07-11 03:05:59 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (settings && settings->menu.navigation.wraparound.setting_enable)
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.fraction = min;
|
2015-11-21 15:32:22 +00:00
|
|
|
else
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.fraction = max;
|
2015-11-21 15:32:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case ST_PATH:
|
|
|
|
case ST_DIR:
|
|
|
|
case ST_STRING:
|
|
|
|
case ST_STRING_OPTIONS:
|
|
|
|
case ST_ACTION:
|
2016-03-18 19:45:01 +00:00
|
|
|
strlcpy(setting->value.source.string, value, setting->size);
|
2015-11-21 15:32:22 +00:00
|
|
|
break;
|
|
|
|
case ST_BOOL:
|
2016-01-20 03:54:17 +00:00
|
|
|
if (string_is_equal(value, "true"))
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.boolean = true;
|
2016-01-20 03:54:17 +00:00
|
|
|
else if (string_is_equal(value, "false"))
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.boolean = false;
|
2015-11-21 15:32:22 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2015-10-11 12:23:32 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting->change_handler)
|
|
|
|
setting->change_handler(setting);
|
2015-08-17 14:24:46 +00:00
|
|
|
|
2015-07-11 03:05:59 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +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
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t* setting = (rarch_setting_t*)data;
|
|
|
|
if (!setting || !s)
|
|
|
|
return;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting->get_string_representation)
|
|
|
|
setting->get_string_representation(setting, s, len);
|
|
|
|
}
|
2015-06-06 14:26:55 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
unsigned menu_setting_get_index_offset(rarch_setting_t *setting)
|
|
|
|
{
|
2015-06-02 18:26:27 +00:00
|
|
|
if (!setting)
|
2015-11-21 15:32:22 +00:00
|
|
|
return 0;
|
|
|
|
return setting->index_offset;
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +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
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!setting || !settings)
|
2015-06-02 18:26:27 +00:00
|
|
|
return -1;
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
index_offset = menu_setting_get_index_offset(setting);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
settings->input.joypad_map[index_offset] = index_offset;
|
2015-06-02 18:26:27 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
|
|
|
|
static int setting_action_start_custom_viewport_width(void *data)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +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
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!settings || !av_info)
|
2015-06-02 18:26:27 +00:00
|
|
|
return -1;
|
|
|
|
|
2016-02-14 04:42:27 +00:00
|
|
|
video_driver_ctl(RARCH_DISPLAY_CTL_VIEWPORT_INFO, &vp);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +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
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
aspectratio_lut[ASPECT_RATIO_CUSTOM].value =
|
|
|
|
(float)custom->width / custom->height;
|
2015-08-17 14:24:46 +00:00
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_action_start_custom_viewport_height(void *data)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +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
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!settings || !av_info)
|
2015-06-02 18:26:27 +00:00
|
|
|
return -1;
|
|
|
|
|
2016-02-14 04:42:27 +00:00
|
|
|
video_driver_ctl(RARCH_DISPLAY_CTL_VIEWPORT_INFO, &vp);
|
2015-06-06 14:26:55 +00:00
|
|
|
|
2015-11-21 15:32:22 +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
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
aspectratio_lut[ASPECT_RATIO_CUSTOM].value =
|
|
|
|
(float)custom->width / custom->height;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
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;
|
2015-11-21 15:32:22 +00:00
|
|
|
unsigned index_offset, current_device;
|
|
|
|
unsigned devices[128], types = 0, port = 0;
|
|
|
|
const struct retro_controller_info *desc = NULL;
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
settings_t *settings = config_get_ptr();
|
2015-12-10 21:30:25 +00:00
|
|
|
rarch_system_info_t *system = NULL;
|
|
|
|
|
|
|
|
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting_generic_action_start_default(setting) != 0)
|
|
|
|
return -1;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
index_offset = menu_setting_get_index_offset(setting);
|
|
|
|
port = index_offset;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
devices[types++] = RETRO_DEVICE_NONE;
|
|
|
|
devices[types++] = RETRO_DEVICE_JOYPAD;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/* Only push RETRO_DEVICE_ANALOG as default if we use an
|
|
|
|
* older core which doesn't use SET_CONTROLLER_INFO. */
|
2016-03-04 18:29:22 +00:00
|
|
|
if (!system->ports.size)
|
2015-11-21 15:32:22 +00:00
|
|
|
devices[types++] = RETRO_DEVICE_ANALOG;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-03-04 18:29:22 +00:00
|
|
|
desc = port < system->ports.size ?
|
|
|
|
&system->ports.data[port] : NULL;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (desc)
|
|
|
|
{
|
|
|
|
unsigned i;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +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
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
current_device = RETRO_DEVICE_JOYPAD;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
settings->input.libretro_device[port] = current_device;
|
2016-01-28 03:13:31 +00:00
|
|
|
|
|
|
|
pad.port = port;
|
|
|
|
pad.device = current_device;
|
|
|
|
core_ctl(CORE_CTL_RETRO_SET_CONTROLLER_PORT_DEVICE, &pad);
|
2015-11-21 15:32:22 +00:00
|
|
|
|
|
|
|
return 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_action_start_video_refresh_rate_auto(
|
|
|
|
void *data)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
video_driver_ctl(RARCH_DISPLAY_CTL_MONITOR_RESET, NULL);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_string_action_start_generic(void *data)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!setting)
|
|
|
|
return -1;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-03-18 19:45:01 +00:00
|
|
|
setting->value.source.string[0] = '\0';
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
unsigned menu_setting_get_bind_type(rarch_setting_t *setting)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!setting)
|
|
|
|
return 0;
|
|
|
|
return setting->bind_type;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_bind_action_start(void *data)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
unsigned bind_type;
|
|
|
|
struct retro_keybind *keybind = NULL;
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
struct retro_keybind *def_binds = (struct retro_keybind *)retro_keybinds_1;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
if (!setting)
|
2015-11-21 15:32:22 +00:00
|
|
|
return -1;
|
2015-10-11 12:23:32 +00:00
|
|
|
|
2016-03-18 18:01:42 +00:00
|
|
|
keybind = (struct retro_keybind*)setting->value.target.keybind;
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!keybind)
|
|
|
|
return -1;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
keybind->joykey = NO_BTN;
|
|
|
|
keybind->joyaxis = AXIS_NONE;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting->index_offset)
|
|
|
|
def_binds = (struct retro_keybind*)retro_keybinds_rest;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!def_binds)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
bind_type = menu_setting_get_bind_type(setting);
|
|
|
|
keybind->key = def_binds[bind_type - MENU_SETTINGS_BIND_BEGIN].key;
|
|
|
|
|
|
|
|
return 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +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
|
|
|
{
|
2015-11-21 15:32:22 +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)
|
2015-11-21 15:32:22 +00:00
|
|
|
return -1;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +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
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_action_right_analog_dpad_mode(void *data, bool wraparound)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +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
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +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;
|
2015-11-21 15:32:22 +00:00
|
|
|
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;
|
|
|
|
|
|
|
|
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
if (!setting)
|
2015-11-21 15:32:22 +00:00
|
|
|
return -1;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
port = setting->index_offset;
|
2015-10-11 12:23:32 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
devices[types++] = RETRO_DEVICE_NONE;
|
|
|
|
devices[types++] = RETRO_DEVICE_JOYPAD;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/* Only push RETRO_DEVICE_ANALOG as default if we use an
|
|
|
|
* older core which doesn't use SET_CONTROLLER_INFO. */
|
2016-03-04 18:29:22 +00:00
|
|
|
if (!system->ports.size)
|
2015-11-21 15:32:22 +00:00
|
|
|
devices[types++] = RETRO_DEVICE_ANALOG;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-03-04 18:29:22 +00:00
|
|
|
if (port < system->ports.size)
|
|
|
|
desc = &system->ports.data[port];
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (desc)
|
|
|
|
{
|
|
|
|
for (i = 0; i < desc->num_types; i++)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +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
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
current_idx = i;
|
|
|
|
break;
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
current_device = devices
|
|
|
|
[(current_idx + types - 1) % types];
|
2015-06-25 06:00:12 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
settings->input.libretro_device[port] = current_device;
|
2016-01-28 03:13:31 +00:00
|
|
|
|
|
|
|
pad.port = port;
|
|
|
|
pad.device = current_device;
|
|
|
|
|
|
|
|
core_ctl(CORE_CTL_RETRO_SET_CONTROLLER_PORT_DEVICE, &pad);
|
2015-10-11 12:23:32 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +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;
|
2015-11-21 15:32:22 +00:00
|
|
|
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;
|
|
|
|
|
|
|
|
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!setting)
|
|
|
|
return -1;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
port = setting->index_offset;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
devices[types++] = RETRO_DEVICE_NONE;
|
|
|
|
devices[types++] = RETRO_DEVICE_JOYPAD;
|
2015-06-26 09:43:11 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
/* Only push RETRO_DEVICE_ANALOG as default if we use an
|
|
|
|
* older core which doesn't use SET_CONTROLLER_INFO. */
|
2016-03-04 18:29:22 +00:00
|
|
|
if (!system->ports.size)
|
2015-11-21 15:32:22 +00:00
|
|
|
devices[types++] = RETRO_DEVICE_ANALOG;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-03-04 18:29:22 +00:00
|
|
|
if (port < system->ports.size)
|
|
|
|
desc = &system->ports.data[port];
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (desc)
|
2015-09-28 16:44:28 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +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
|
|
|
|
2015-11-21 15:32:22 +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
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
current_idx = i;
|
|
|
|
break;
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
current_device = devices
|
|
|
|
[(current_idx + 1) % types];
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
settings->input.libretro_device[port] = current_device;
|
2016-01-28 03:13:31 +00:00
|
|
|
|
|
|
|
pad.port = port;
|
|
|
|
pad.device = current_device;
|
|
|
|
|
|
|
|
core_ctl(CORE_CTL_RETRO_SET_CONTROLLER_PORT_DEVICE, &pad);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
return 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_action_left_bind_device(void *data, bool wraparound)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +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
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!setting)
|
|
|
|
return -1;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
index_offset = menu_setting_get_index_offset(setting);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
p = &settings->input.joypad_map[index_offset];
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +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
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_action_right_bind_device(void *data, bool wraparound)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +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
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!setting)
|
|
|
|
return -1;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
index_offset = menu_setting_get_index_offset(setting);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
p = &settings->input.joypad_map[index_offset];
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (*p < settings->input.max_users)
|
|
|
|
(*p)++;
|
|
|
|
|
|
|
|
return 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
|
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
/**
|
2015-11-21 15:32:22 +00:00
|
|
|
******* ACTION OK CALLBACK FUNCTIONS *******
|
|
|
|
**/
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_action_ok_bind_all(void *data, bool wraparound)
|
|
|
|
{
|
|
|
|
(void)wraparound;
|
2016-02-25 16:41:33 +00:00
|
|
|
if (!menu_input_ctl(MENU_INPUT_CTL_BIND_ALL, data))
|
2015-11-21 15:32:22 +00:00
|
|
|
return -1;
|
|
|
|
return 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_action_ok_bind_all_save_autoconfig(void *data, bool wraparound)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
unsigned index_offset;
|
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
(void)wraparound;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!settings || !setting)
|
|
|
|
return -1;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
index_offset = menu_setting_get_index_offset(setting);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if(config_save_autoconf_profile(settings->input.device_names[index_offset], index_offset))
|
2016-02-09 02:29:37 +00:00
|
|
|
runloop_msg_queue_push("Autoconf file saved successfully", 1, 100, true);
|
2015-11-21 15:32:22 +00:00
|
|
|
else
|
2016-02-09 02:29:37 +00:00
|
|
|
runloop_msg_queue_push("Error saving autoconf file", 1, 100, true);
|
2015-11-21 15:32:22 +00:00
|
|
|
|
|
|
|
return 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_action_ok_bind_defaults(void *data, bool wraparound)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +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;
|
2015-11-21 15:32:22 +00:00
|
|
|
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
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
(void)wraparound;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +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*)
|
2015-11-21 15:32:22 +00:00
|
|
|
&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
|
|
|
|
2015-11-21 15:32:22 +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;
|
|
|
|
|
|
|
|
menu_input_ctl(MENU_INPUT_CTL_BIND_SET_MIN_MAX, &lim);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +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;
|
2015-11-21 15:32:22 +00:00
|
|
|
target->joyaxis = AXIS_NONE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_action_ok_video_refresh_rate_auto(void *data, bool wraparound)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +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
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!setting)
|
|
|
|
return -1;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +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);
|
2015-11-21 15:32:22 +00:00
|
|
|
/* Incase refresh rate update forced non-block video. */
|
2016-01-22 14:34:43 +00:00
|
|
|
event_cmd_ctl(EVENT_CMD_VIDEO_SET_BLOCKING_STATE, NULL);
|
2015-11-21 15:32:22 +00:00
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (setting_generic_action_ok_default(setting, wraparound) != 0)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
|
|
|
|
return 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_generic_action_ok_linefeed(void *data, bool wraparound)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2016-02-25 17:36:29 +00:00
|
|
|
menu_input_ctx_line_t line;
|
2015-11-21 15:32:22 +00:00
|
|
|
input_keyboard_line_complete_t cb = NULL;
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
const char *short_description = menu_setting_get_short_description(setting);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!setting)
|
|
|
|
return -1;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
(void)wraparound;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
switch (menu_setting_get_type(setting))
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
case ST_UINT:
|
2016-02-25 16:26:55 +00:00
|
|
|
cb = menu_input_st_uint_cb;
|
2015-06-02 18:26:27 +00:00
|
|
|
break;
|
2015-11-21 15:32:22 +00:00
|
|
|
case ST_HEX:
|
2016-02-25 16:26:55 +00:00
|
|
|
cb = menu_input_st_hex_cb;
|
2015-11-21 15:32:22 +00:00
|
|
|
break;
|
|
|
|
case ST_STRING:
|
|
|
|
case ST_STRING_OPTIONS:
|
2016-02-25 16:26:55 +00:00
|
|
|
cb = menu_input_st_string_cb;
|
2015-06-02 18:26:27 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2016-02-25 17:36:29 +00:00
|
|
|
line.label = short_description;
|
|
|
|
line.label_setting = setting->name;
|
|
|
|
line.type = 0;
|
|
|
|
line.idx = 0;
|
|
|
|
line.cb = cb;
|
|
|
|
|
|
|
|
if (!menu_input_ctl(MENU_INPUT_CTL_START_LINE, &line))
|
|
|
|
return -1;
|
2015-11-21 15:32:22 +00:00
|
|
|
|
|
|
|
return 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
static int setting_action_action_ok(void *data, bool wraparound)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-11-21 15:32:22 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
(void)wraparound;
|
|
|
|
|
|
|
|
if (setting->cmd_trigger.idx != EVENT_CMD_NONE)
|
2016-01-22 14:34:43 +00:00
|
|
|
event_cmd_ctl(setting->cmd_trigger.idx, NULL);
|
2015-11-21 15:32:22 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int setting_bind_action_ok(void *data, bool wraparound)
|
|
|
|
{
|
|
|
|
(void)wraparound;
|
2016-02-25 16:41:33 +00:00
|
|
|
if (!menu_input_ctl(MENU_INPUT_CTL_BIND_SINGLE, data))
|
|
|
|
return -1;
|
2015-11-21 15:32:22 +00:00
|
|
|
return 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void get_string_representation_bind_device(void * data, char *s,
|
|
|
|
size_t len)
|
|
|
|
{
|
2015-10-11 12:23:32 +00:00
|
|
|
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;
|
|
|
|
|
2015-10-11 15:24:37 +00:00
|
|
|
index_offset = menu_setting_get_index_offset(setting);
|
2015-10-11 12:23:32 +00:00
|
|
|
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];
|
|
|
|
|
|
|
|
if (*device_name)
|
2015-11-25 03:30:51 +00:00
|
|
|
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)",
|
|
|
|
menu_hash_to_str(MENU_VALUE_NOT_AVAILABLE),
|
|
|
|
menu_hash_to_str(MENU_VALUE_PORT),
|
|
|
|
map);
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
else
|
2015-06-25 05:20:11 +00:00
|
|
|
strlcpy(s, menu_hash_to_str(MENU_VALUE_DISABLED), len);
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2015-10-11 15:24:37 +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.
|
|
|
|
**/
|
2015-10-11 15:24:37 +00:00
|
|
|
void menu_setting_get_label(void *data, char *s,
|
2015-06-02 18:26:27 +00:00
|
|
|
size_t len, unsigned *w, unsigned type,
|
|
|
|
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, s, len);
|
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +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();
|
2015-06-17 17:55:24 +00:00
|
|
|
uint32_t hash = setting ? menu_hash_calculate(setting->name) : 0;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return;
|
|
|
|
|
2016-03-18 19:45:01 +00:00
|
|
|
|
2015-06-05 13:14:26 +00:00
|
|
|
switch (hash)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-06-05 13:14:26 +00:00
|
|
|
case MENU_LABEL_AUDIO_RATE_CONTROL_DELTA:
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.fraction = settings->audio.rate_control_delta;
|
|
|
|
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_LABEL_AUDIO_MAX_TIMING_SKEW:
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.fraction = settings->audio.max_timing_skew;
|
2015-06-05 13:14:26 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_REFRESH_RATE_AUTO:
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.fraction = settings->video.refresh_rate;
|
2015-06-05 13:14:26 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_INPUT_PLAYER1_JOYPAD_INDEX:
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.integer = settings->input.joypad_map[0];
|
2015-06-05 13:14:26 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_INPUT_PLAYER2_JOYPAD_INDEX:
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.integer = settings->input.joypad_map[1];
|
2015-06-05 13:14:26 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_INPUT_PLAYER3_JOYPAD_INDEX:
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.integer = settings->input.joypad_map[2];
|
2015-06-05 13:14:26 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_INPUT_PLAYER4_JOYPAD_INDEX:
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.integer = settings->input.joypad_map[3];
|
2015-06-05 13:14:26 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_INPUT_PLAYER5_JOYPAD_INDEX:
|
2016-03-18 18:01:42 +00:00
|
|
|
*setting->value.target.integer = settings->input.joypad_map[4];
|
2015-06-05 13:14:26 +00:00
|
|
|
break;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
void general_write_handler(void *data)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
|
|
|
enum event_command rarch_cmd = EVENT_CMD_NONE;
|
|
|
|
menu_displaylist_info_t info = {0};
|
2015-09-28 00:10:44 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
global_t *global = global_get_ptr();
|
2015-10-27 09:33:19 +00:00
|
|
|
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
2015-12-10 21:30:25 +00:00
|
|
|
rarch_system_info_t *system = NULL;
|
2015-09-28 00:10:44 +00:00
|
|
|
uint32_t hash = setting ? menu_hash_calculate(setting->name) : 0;
|
|
|
|
uint64_t flags = menu_setting_get_flags(setting);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-12-10 21:30:25 +00:00
|
|
|
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
if (!setting)
|
|
|
|
return;
|
|
|
|
|
2016-03-18 19:45:01 +00:00
|
|
|
switch (menu_setting_get_type(setting))
|
|
|
|
{
|
|
|
|
case ST_PATH:
|
|
|
|
case ST_DIR:
|
|
|
|
case ST_STRING:
|
|
|
|
case ST_STRING_OPTIONS:
|
|
|
|
case ST_ACTION:
|
|
|
|
strlcpy(setting->value.target.string, setting->value.source.string, setting->size);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
if (setting->cmd_trigger.idx != EVENT_CMD_NONE)
|
|
|
|
{
|
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;
|
|
|
|
}
|
|
|
|
|
2015-06-05 13:14:26 +00:00
|
|
|
switch (hash)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2016-02-09 16:41:19 +00:00
|
|
|
case MENU_LABEL_VIDEO_THREADED:
|
|
|
|
{
|
2016-03-18 18:01:42 +00:00
|
|
|
if (*setting->value.target.boolean)
|
2016-02-09 17:26:27 +00:00
|
|
|
task_queue_ctl(TASK_QUEUE_CTL_SET_THREADED, NULL);
|
2016-02-09 16:41:19 +00:00
|
|
|
else
|
2016-02-09 17:26:27 +00:00
|
|
|
task_queue_ctl(TASK_QUEUE_CTL_UNSET_THREADED, NULL);
|
2016-02-09 16:41:19 +00:00
|
|
|
}
|
|
|
|
break;
|
2016-01-27 00:51:09 +00:00
|
|
|
case MENU_LABEL_INPUT_POLL_TYPE_BEHAVIOR:
|
2016-03-18 18:01:42 +00:00
|
|
|
core_ctl(CORE_CTL_SET_POLL_TYPE, setting->value.target.integer);
|
2016-01-27 00:51:09 +00:00
|
|
|
break;
|
2015-09-27 17:14:56 +00:00
|
|
|
case MENU_LABEL_VIDEO_SCALE_INTEGER:
|
|
|
|
{
|
|
|
|
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-02-14 04:42:27 +00:00
|
|
|
video_driver_ctl(RARCH_DISPLAY_CTL_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;
|
2015-09-27 17:19:06 +00:00
|
|
|
aspectratio_lut[ASPECT_RATIO_CUSTOM].value =
|
|
|
|
(float)custom->width / custom->height;
|
2015-09-27 17:14:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2015-06-05 13:14:26 +00:00
|
|
|
case MENU_LABEL_HELP:
|
2016-03-18 18:01:42 +00:00
|
|
|
if (*setting->value.target.boolean)
|
2015-06-05 13:14:26 +00:00
|
|
|
{
|
2015-10-17 15:58:59 +00:00
|
|
|
info.list = menu_stack;
|
2015-06-05 13:14:26 +00:00
|
|
|
info.type = 0;
|
|
|
|
info.directory_ptr = 0;
|
2015-06-19 05:23:58 +00:00
|
|
|
strlcpy(info.label,
|
|
|
|
menu_hash_to_str(MENU_LABEL_HELP), sizeof(info.label));
|
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);
|
2015-10-11 15:24:37 +00:00
|
|
|
menu_setting_set_with_string_representation(setting, "false");
|
2015-06-05 13:14:26 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case MENU_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_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_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. */
|
|
|
|
rarch_cmd = EVENT_CMD_VIDEO_SET_BLOCKING_STATE;
|
2015-06-05 13:14:26 +00:00
|
|
|
break;
|
|
|
|
case MENU_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)
|
|
|
|
rarch_cmd = EVENT_CMD_REINIT;
|
|
|
|
break;
|
|
|
|
case MENU_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_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_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_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_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_LABEL_LOG_VERBOSITY:
|
2015-11-22 19:50:39 +00:00
|
|
|
{
|
|
|
|
bool *verbose = retro_main_verbosity();
|
|
|
|
|
2016-03-18 18:01:42 +00:00
|
|
|
*verbose = *setting->value.target.boolean;
|
|
|
|
global->has_set.verbosity = *setting->value.target.boolean;
|
2015-11-22 19:50:39 +00:00
|
|
|
}
|
2015-06-05 13:14:26 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_SMOOTH:
|
|
|
|
video_driver_set_filtering(1, settings->video.smooth);
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_ROTATION:
|
|
|
|
video_driver_set_rotation(
|
2016-03-18 18:01:42 +00:00
|
|
|
(*setting->value.target.unsigned_integer +
|
2015-06-25 11:27:21 +00:00
|
|
|
system->rotation) % 4);
|
2015-06-05 13:14:26 +00:00
|
|
|
break;
|
|
|
|
case MENU_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_LABEL_AUDIO_LATENCY:
|
|
|
|
rarch_cmd = EVENT_CMD_AUDIO_REINIT;
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_PAL60_ENABLE:
|
2016-03-18 18:01:42 +00:00
|
|
|
if (*setting->value.target.boolean && global->console.screen.pal_enable)
|
2015-06-05 13:14:26 +00:00
|
|
|
rarch_cmd = EVENT_CMD_REINIT;
|
|
|
|
else
|
2015-10-11 15:24:37 +00:00
|
|
|
menu_setting_set_with_string_representation(setting, "false");
|
2015-06-05 13:14:26 +00:00
|
|
|
break;
|
|
|
|
case MENU_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();
|
2015-06-02 18:26:27 +00:00
|
|
|
#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_LABEL_NETPLAY_IP_ADDRESS:
|
2015-06-02 18:26:27 +00:00
|
|
|
#ifdef HAVE_NETPLAY
|
2016-03-18 19:45:01 +00:00
|
|
|
global->has_set.netplay_ip_address = (!string_is_empty(setting->value.source.string));
|
2015-06-02 18:26:27 +00:00
|
|
|
#endif
|
2015-06-05 13:14:26 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_NETPLAY_MODE:
|
|
|
|
#ifdef HAVE_NETPLAY
|
2015-07-27 15:18:10 +00:00
|
|
|
if (!global->netplay.is_client)
|
|
|
|
*global->netplay.server = '\0';
|
|
|
|
global->has_set.netplay_mode = true;
|
2015-06-05 13:14:26 +00:00
|
|
|
#endif
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_NETPLAY_SPECTATOR_MODE_ENABLE:
|
|
|
|
#ifdef HAVE_NETPLAY
|
2015-07-27 15:18:10 +00:00
|
|
|
if (global->netplay.is_spectate)
|
|
|
|
*global->netplay.server = '\0';
|
2015-06-05 13:14:26 +00:00
|
|
|
#endif
|
|
|
|
break;
|
|
|
|
case MENU_LABEL_NETPLAY_DELAY_FRAMES:
|
|
|
|
#ifdef HAVE_NETPLAY
|
2015-07-27 15:18:10 +00:00
|
|
|
global->has_set.netplay_delay_frames = (global->netplay.sync_frames > 0);
|
2015-06-05 13:14:26 +00:00
|
|
|
#endif
|
|
|
|
break;
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (rarch_cmd || setting->cmd_trigger.triggered)
|
2016-01-22 14:34:43 +00:00
|
|
|
event_cmd_ctl(rarch_cmd, NULL);
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void setting_add_special_callbacks(
|
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
unsigned values)
|
|
|
|
{
|
|
|
|
unsigned idx = list_info->index - 1;
|
|
|
|
|
|
|
|
if (values & SD_FLAG_ALLOW_INPUT)
|
|
|
|
{
|
2015-06-03 08:49:56 +00:00
|
|
|
(*list)[idx].action_ok = setting_generic_action_ok_linefeed;
|
2015-06-06 14:26:55 +00:00
|
|
|
(*list)[idx].action_select = setting_generic_action_ok_linefeed;
|
2015-06-03 08:49:56 +00:00
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
switch ((*list)[idx].type)
|
|
|
|
{
|
|
|
|
case ST_UINT:
|
|
|
|
(*list)[idx].action_cancel = NULL;
|
|
|
|
break;
|
|
|
|
case ST_HEX:
|
|
|
|
(*list)[idx].action_cancel = NULL;
|
|
|
|
break;
|
|
|
|
case ST_STRING:
|
2015-06-02 19:34:27 +00:00
|
|
|
(*list)[idx].action_start = setting_string_action_start_generic;
|
2015-06-02 18:26:27 +00:00
|
|
|
(*list)[idx].action_cancel = NULL;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
void settings_data_list_current_add_flags(
|
2015-06-02 18:26:27 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
unsigned values)
|
|
|
|
{
|
2015-08-17 15:55:44 +00:00
|
|
|
(*list)[list_info->index - 1].flags |= values;
|
2015-06-02 18:26:27 +00:00
|
|
|
setting_add_special_callbacks(list, list_info, values);
|
|
|
|
}
|
|
|
|
|
2015-08-30 21:19:45 +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-01-22 14:34:43 +00:00
|
|
|
event_cmd_ctl(EVENT_CMD_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-01-22 14:34:43 +00:00
|
|
|
event_cmd_ctl(EVENT_CMD_OVERLAY_INIT, NULL);
|
2015-06-02 18:26:27 +00:00
|
|
|
else
|
2016-01-22 14:34:43 +00:00
|
|
|
event_cmd_ctl(EVENT_CMD_OVERLAY_DEINIT, NULL);
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
2015-08-30 21:19:45 +00:00
|
|
|
#endif
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-10-23 04:54:33 +00:00
|
|
|
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];
|
|
|
|
static char group_lbl[MAX_USERS][PATH_MAX_LENGTH];
|
|
|
|
unsigned i;
|
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
global_t *global = global_get_ptr();
|
|
|
|
const struct retro_keybind* const defaults =
|
|
|
|
(user == 0) ? retro_keybinds_1 : retro_keybinds_rest;
|
2015-12-10 21:30:25 +00:00
|
|
|
rarch_system_info_t *system = NULL;
|
|
|
|
|
|
|
|
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
2015-10-23 04:54:33 +00:00
|
|
|
|
|
|
|
snprintf(buffer[user], sizeof(buffer[user]),
|
|
|
|
"%s %u", menu_hash_to_str(MENU_VALUE_USER), user + 1);
|
|
|
|
snprintf(group_lbl[user], sizeof(group_lbl[user]),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_USER_BINDS), user + 1);
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info, group_lbl[user], parent_group);
|
2015-10-23 04:54:33 +00:00
|
|
|
|
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
|
|
|
|
|
|
|
START_SUB_GROUP(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
buffer[user],
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-23 04:54:33 +00:00
|
|
|
parent_group);
|
|
|
|
|
|
|
|
{
|
|
|
|
/* 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];
|
|
|
|
|
|
|
|
snprintf(key[user], sizeof(key[user]),
|
|
|
|
"input_player%u_joypad_index", user + 1);
|
|
|
|
snprintf(key_type[user], sizeof(key_type[user]),
|
|
|
|
"input_libretro_device_p%u", user + 1);
|
|
|
|
snprintf(key_analog[user], sizeof(key_analog[user]),
|
|
|
|
"input_player%u_analog_dpad_mode", user + 1);
|
|
|
|
snprintf(key_bind_all[user], sizeof(key_bind_all[user]),
|
|
|
|
"input_player%u_bind_all", user + 1);
|
|
|
|
snprintf(key_bind_all_save_autoconfig[user], sizeof(key_bind_all[user]),
|
|
|
|
"input_player%u_bind_all_save_autoconfig", user + 1);
|
|
|
|
snprintf(key_bind_defaults[user], sizeof(key_bind_defaults[user]),
|
|
|
|
"input_player%u_bind_defaults", user + 1);
|
|
|
|
|
|
|
|
snprintf(label[user], sizeof(label[user]),
|
|
|
|
"%s %u Device Index", menu_hash_to_str(MENU_VALUE_USER), user + 1);
|
|
|
|
snprintf(label_type[user], sizeof(label_type[user]),
|
|
|
|
"%s %u Device Type", menu_hash_to_str(MENU_VALUE_USER), user + 1);
|
|
|
|
snprintf(label_analog[user], sizeof(label_analog[user]),
|
|
|
|
"%s %u Analog To Digital Type", menu_hash_to_str(MENU_VALUE_USER), user + 1);
|
|
|
|
snprintf(label_bind_all[user], sizeof(label_bind_all[user]),
|
|
|
|
"%s %u Bind All", menu_hash_to_str(MENU_VALUE_USER), user + 1);
|
|
|
|
snprintf(label_bind_defaults[user], sizeof(label_bind_defaults[user]),
|
|
|
|
"%s %u Bind Default All", menu_hash_to_str(MENU_VALUE_USER), user + 1);
|
|
|
|
snprintf(label_bind_all_save_autoconfig[user], sizeof(label_bind_all_save_autoconfig[user]),
|
|
|
|
"%s %u Save Autoconfig", menu_hash_to_str(MENU_VALUE_USER), user + 1);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->input.libretro_device[user],
|
2015-10-23 04:54:33 +00:00
|
|
|
key_type[user],
|
|
|
|
label_type[user],
|
|
|
|
user,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-23 04:54:33 +00:00
|
|
|
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;
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->input.analog_dpad_mode[user],
|
2015-10-23 04:54:33 +00:00
|
|
|
key_analog[user],
|
|
|
|
label_analog[user],
|
|
|
|
user,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-23 04:54:33 +00:00
|
|
|
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;
|
|
|
|
|
|
|
|
CONFIG_ACTION(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-10-23 04:54:33 +00:00
|
|
|
key[user],
|
|
|
|
label[user],
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-23 04:54:33 +00:00
|
|
|
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;
|
|
|
|
|
|
|
|
CONFIG_ACTION(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-10-23 04:54:33 +00:00
|
|
|
key_bind_all[user],
|
|
|
|
label_bind_all[user],
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-23 04:54:33 +00:00
|
|
|
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;
|
|
|
|
|
|
|
|
CONFIG_ACTION(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-10-23 04:54:33 +00:00
|
|
|
key_bind_defaults[user],
|
|
|
|
label_bind_defaults[user],
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-23 04:54:33 +00:00
|
|
|
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;
|
|
|
|
|
|
|
|
CONFIG_ACTION(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-10-23 04:54:33 +00:00
|
|
|
key_bind_all_save_autoconfig[user],
|
|
|
|
label_bind_all_save_autoconfig[user],
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-23 04:54:33 +00:00
|
|
|
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 ++)
|
|
|
|
{
|
|
|
|
char label[PATH_MAX_LENGTH];
|
|
|
|
char name[PATH_MAX_LENGTH];
|
|
|
|
bool do_add = true;
|
|
|
|
|
2015-12-01 17:29:30 +00:00
|
|
|
if (input_config_bind_map_get_meta(i))
|
2015-10-23 04:54:33 +00:00
|
|
|
continue;
|
|
|
|
|
|
|
|
strlcpy(label, buffer[user], sizeof(label));
|
|
|
|
strlcat(label, " ", sizeof(label));
|
|
|
|
if (
|
|
|
|
settings->input.input_descriptor_label_show
|
|
|
|
&& (i < RARCH_FIRST_META_KEY)
|
|
|
|
&& (global->has_set.input_descriptors)
|
|
|
|
&& (i != RARCH_TURBO_ENABLE)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
if (system->input_desc_btn[user][i])
|
|
|
|
strlcat(label,
|
|
|
|
system->input_desc_btn[user][i],
|
|
|
|
sizeof(label));
|
|
|
|
else
|
|
|
|
{
|
|
|
|
strlcat(label, menu_hash_to_str(MENU_VALUE_NOT_AVAILABLE),
|
|
|
|
sizeof(label));
|
|
|
|
|
|
|
|
if (settings->input.input_descriptor_hide_unbound)
|
|
|
|
do_add = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2015-11-28 01:13:27 +00:00
|
|
|
strlcat(label, input_config_bind_map_get_desc(i), sizeof(label));
|
2015-10-23 04:54:33 +00:00
|
|
|
|
2015-11-28 01:13:27 +00:00
|
|
|
snprintf(name, sizeof(name), "p%u_%s", user + 1, input_config_bind_map_get_base(i));
|
2015-10-23 04:54:33 +00:00
|
|
|
|
|
|
|
if (do_add)
|
|
|
|
{
|
|
|
|
CONFIG_BIND(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->input.binds[user][i],
|
2015-10-23 04:54:33 +00:00
|
|
|
user + 1,
|
|
|
|
user,
|
|
|
|
strdup(name), /* TODO: Find a way to fix these memleaks. */
|
|
|
|
strdup(label),
|
|
|
|
&defaults[i],
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-23 04:54:33 +00:00
|
|
|
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-03-20 18:54:16 +00:00
|
|
|
enum settings_list_type
|
|
|
|
{
|
|
|
|
SETTINGS_LIST_NONE = 0,
|
|
|
|
SETTINGS_LIST_MAIN_MENU,
|
|
|
|
SETTINGS_LIST_DRIVERS,
|
|
|
|
SETTINGS_LIST_CORE
|
|
|
|
};
|
|
|
|
|
|
|
|
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,
|
2015-10-19 01:28:00 +00:00
|
|
|
const char *parent_group)
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-10-23 04:54:33 +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};
|
2015-06-15 04:25:41 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-23 09:46:45 +00:00
|
|
|
(void)settings;
|
|
|
|
|
2016-03-20 18:54:16 +00:00
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case SETTINGS_LIST_MAIN_MENU:
|
|
|
|
START_GROUP(list, list_info, &group_info, menu_hash_to_str(MENU_VALUE_MAIN_MENU), parent_group);
|
|
|
|
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,
|
|
|
|
menu_hash_to_str(MENU_LABEL_STATE_SLOT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_STATE_SLOT),
|
|
|
|
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);
|
2015-11-01 09:59:01 +00:00
|
|
|
|
2016-03-20 18:54:16 +00:00
|
|
|
CONFIG_ACTION(
|
|
|
|
list, list_info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_START_CORE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_START_CORE),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group);
|
2016-01-24 00:51:05 +00:00
|
|
|
|
2016-03-20 18:54:16 +00:00
|
|
|
CONFIG_ACTION(
|
|
|
|
list, list_info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_CONTENT_SETTINGS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CONTENT_SETTINGS),
|
|
|
|
&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
|
|
|
{
|
|
|
|
char ext_name[PATH_MAX_LENGTH];
|
|
|
|
|
|
|
|
if (frontend_driver_get_core_extension(ext_name, sizeof(ext_name)))
|
|
|
|
{
|
|
|
|
CONFIG_ACTION(
|
|
|
|
list, list_info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_CORE_LIST),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CORE_LIST),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group);
|
|
|
|
(*list)[list_info->index - 1].size = sizeof(settings->libretro);
|
|
|
|
(*list)[list_info->index - 1].value.target.string = settings->libretro;
|
|
|
|
(*list)[list_info->index - 1].values = ext_name;
|
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_LOAD_CORE);
|
|
|
|
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-03-20 18:54:16 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_LOAD_CONTENT_LIST),
|
|
|
|
menu_hash_to_str(MENU_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,
|
|
|
|
menu_hash_to_str(MENU_LABEL_LOAD_CONTENT_HISTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_LOAD_CONTENT_HISTORY),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group);
|
|
|
|
}
|
2015-06-28 14:24:21 +00:00
|
|
|
|
2015-10-22 02:46:05 +00:00
|
|
|
|
|
|
|
#if defined(HAVE_NETWORKING)
|
|
|
|
|
|
|
|
#if defined(HAVE_LIBRETRODB)
|
2016-03-20 18:54:16 +00:00
|
|
|
CONFIG_ACTION(
|
|
|
|
list, list_info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_ADD_CONTENT_LIST),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ADD_CONTENT_LIST),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group);
|
2015-07-04 20:47:44 +00:00
|
|
|
#endif
|
2015-07-03 23:51:41 +00:00
|
|
|
|
2016-03-20 18:54:16 +00:00
|
|
|
CONFIG_ACTION(
|
|
|
|
list, list_info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_ONLINE_UPDATER),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ONLINE_UPDATER),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group);
|
2015-06-23 01:29:55 +00:00
|
|
|
#endif
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-03-20 18:54:16 +00:00
|
|
|
CONFIG_ACTION(
|
|
|
|
list, list_info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_SETTINGS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS),
|
|
|
|
&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,
|
|
|
|
menu_hash_to_str(MENU_LABEL_INFORMATION_LIST),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INFORMATION_LIST),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group);
|
2015-06-22 06:06:54 +00:00
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
#ifndef HAVE_DYNAMIC
|
2016-03-20 18:54:16 +00:00
|
|
|
CONFIG_ACTION(
|
|
|
|
list, list_info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_RESTART_RETROARCH),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RESTART_RETROARCH),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group);
|
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_RESTART_RETROARCH);
|
2015-06-02 18:26:27 +00:00
|
|
|
#endif
|
|
|
|
|
2016-03-20 18:54:16 +00:00
|
|
|
CONFIG_ACTION(
|
|
|
|
list, list_info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_CONFIGURATIONS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CONFIGURATIONS),
|
|
|
|
&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,
|
|
|
|
menu_hash_to_str(MENU_LABEL_SAVE_CURRENT_CONFIG),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SAVE_CURRENT_CONFIG),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group);
|
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_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,
|
|
|
|
menu_hash_to_str(MENU_LABEL_SAVE_NEW_CONFIG),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SAVE_NEW_CONFIG),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group);
|
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_MENU_SAVE_CONFIG);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-03-20 18:54:16 +00:00
|
|
|
CONFIG_ACTION(
|
|
|
|
list, list_info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_HELP_LIST),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_HELP_LIST),
|
|
|
|
&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,
|
|
|
|
menu_hash_to_str(MENU_LABEL_QUIT_RETROARCH),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_QUIT_RETROARCH),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group);
|
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_QUIT_RETROARCH);
|
2015-06-02 18:26:27 +00:00
|
|
|
#endif
|
|
|
|
|
2015-10-23 08:24:47 +00:00
|
|
|
#if defined(HAVE_LAKKA)
|
2016-03-20 18:54:16 +00:00
|
|
|
CONFIG_ACTION(
|
|
|
|
list, list_info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_SHUTDOWN),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SHUTDOWN),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group);
|
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_SHUTDOWN);
|
2015-10-23 08:24:47 +00:00
|
|
|
|
2016-03-20 18:54:16 +00:00
|
|
|
CONFIG_ACTION(
|
|
|
|
list, list_info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_REBOOT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_REBOOT),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group);
|
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_REBOOT);
|
2016-01-18 19:31:38 +00:00
|
|
|
#endif
|
|
|
|
|
2016-03-20 18:54:16 +00:00
|
|
|
CONFIG_ACTION(
|
|
|
|
list, list_info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_SETTINGS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_SETTINGS),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2016-03-20 18:54:16 +00:00
|
|
|
CONFIG_ACTION(
|
|
|
|
list, list_info,
|
|
|
|
menu_hash_to_str(MENU_LABEL_PLAYLIST_SETTINGS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_PLAYLIST_SETTINGS),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
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:
|
|
|
|
START_GROUP(list, list_info, &group_info, menu_hash_to_str(MENU_LABEL_VALUE_DRIVER_SETTINGS), parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-03-20 18:54:16 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-03-20 18:54:16 +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 18:54:16 +00:00
|
|
|
CONFIG_STRING_OPTIONS(
|
|
|
|
list, list_info,
|
|
|
|
settings->input.driver,
|
|
|
|
sizeof(settings->input.driver),
|
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_DRIVER),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_DRIVER),
|
|
|
|
config_get_default_input(),
|
|
|
|
config_get_input_driver_options(),
|
|
|
|
&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);
|
|
|
|
strlcpy(
|
|
|
|
(*list)[list_info->index - 1].value.source.string,
|
|
|
|
(*list)[list_info->index - 1].value.target.string,
|
|
|
|
(*list)[list_info->index - 1].size);
|
|
|
|
(*list)[list_info->index - 1].action_left = setting_string_action_left_driver;
|
|
|
|
(*list)[list_info->index - 1].action_right = setting_string_action_right_driver;
|
|
|
|
|
|
|
|
CONFIG_STRING_OPTIONS(
|
|
|
|
list, list_info,
|
|
|
|
settings->input.joypad_driver,
|
|
|
|
sizeof(settings->input.driver),
|
|
|
|
menu_hash_to_str(MENU_LABEL_JOYPAD_DRIVER),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_JOYPAD_DRIVER),
|
|
|
|
config_get_default_joypad(),
|
|
|
|
config_get_joypad_driver_options(),
|
|
|
|
&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);
|
|
|
|
strlcpy(
|
|
|
|
(*list)[list_info->index - 1].value.source.string,
|
|
|
|
(*list)[list_info->index - 1].value.target.string,
|
|
|
|
(*list)[list_info->index - 1].size);
|
|
|
|
(*list)[list_info->index - 1].action_left = setting_string_action_left_driver;
|
|
|
|
(*list)[list_info->index - 1].action_right = setting_string_action_right_driver;
|
|
|
|
|
|
|
|
CONFIG_STRING_OPTIONS(
|
|
|
|
list, list_info,
|
|
|
|
settings->video.driver,
|
|
|
|
sizeof(settings->video.driver),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_DRIVER),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_DRIVER),
|
|
|
|
config_get_default_video(),
|
|
|
|
config_get_video_driver_options(),
|
|
|
|
&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);
|
|
|
|
strlcpy(
|
|
|
|
(*list)[list_info->index - 1].value.source.string,
|
|
|
|
(*list)[list_info->index - 1].value.target.string,
|
|
|
|
(*list)[list_info->index - 1].size);
|
|
|
|
(*list)[list_info->index - 1].action_left = setting_string_action_left_driver;
|
|
|
|
(*list)[list_info->index - 1].action_right = setting_string_action_right_driver;
|
|
|
|
|
|
|
|
CONFIG_STRING_OPTIONS(
|
|
|
|
list, list_info,
|
|
|
|
settings->audio.driver,
|
|
|
|
sizeof(settings->audio.driver),
|
|
|
|
menu_hash_to_str(MENU_LABEL_AUDIO_DRIVER),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_DRIVER),
|
|
|
|
config_get_default_audio(),
|
|
|
|
config_get_audio_driver_options(),
|
|
|
|
&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);
|
|
|
|
strlcpy(
|
|
|
|
(*list)[list_info->index - 1].value.source.string,
|
|
|
|
(*list)[list_info->index - 1].value.target.string,
|
|
|
|
(*list)[list_info->index - 1].size);
|
|
|
|
(*list)[list_info->index - 1].action_left = setting_string_action_left_driver;
|
|
|
|
(*list)[list_info->index - 1].action_right = setting_string_action_right_driver;
|
|
|
|
|
|
|
|
CONFIG_STRING_OPTIONS(
|
|
|
|
list, list_info,
|
|
|
|
settings->audio.resampler,
|
|
|
|
sizeof(settings->audio.resampler),
|
|
|
|
menu_hash_to_str(MENU_LABEL_AUDIO_RESAMPLER_DRIVER),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_RESAMPLER_DRIVER),
|
|
|
|
config_get_default_audio_resampler(),
|
|
|
|
config_get_audio_resampler_driver_options(),
|
|
|
|
&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);
|
|
|
|
strlcpy(
|
|
|
|
(*list)[list_info->index - 1].value.source.string,
|
|
|
|
(*list)[list_info->index - 1].value.target.string,
|
|
|
|
(*list)[list_info->index - 1].size);
|
|
|
|
(*list)[list_info->index - 1].action_left = setting_string_action_left_driver;
|
|
|
|
(*list)[list_info->index - 1].action_right = setting_string_action_right_driver;
|
|
|
|
|
|
|
|
CONFIG_STRING_OPTIONS(
|
|
|
|
list, list_info,
|
|
|
|
settings->camera.driver,
|
|
|
|
sizeof(settings->camera.driver),
|
|
|
|
menu_hash_to_str(MENU_LABEL_CAMERA_DRIVER),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CAMERA_DRIVER),
|
|
|
|
config_get_default_camera(),
|
|
|
|
config_get_camera_driver_options(),
|
|
|
|
&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);
|
|
|
|
strlcpy(
|
|
|
|
(*list)[list_info->index - 1].value.source.string,
|
|
|
|
(*list)[list_info->index - 1].value.target.string,
|
|
|
|
(*list)[list_info->index - 1].size);
|
|
|
|
(*list)[list_info->index - 1].action_left = setting_string_action_left_driver;
|
|
|
|
(*list)[list_info->index - 1].action_right = setting_string_action_right_driver;
|
|
|
|
|
|
|
|
CONFIG_STRING_OPTIONS(
|
|
|
|
list, list_info,
|
|
|
|
settings->location.driver,
|
|
|
|
sizeof(settings->location.driver),
|
|
|
|
menu_hash_to_str(MENU_LABEL_LOCATION_DRIVER),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_LOCATION_DRIVER),
|
|
|
|
config_get_default_location(),
|
|
|
|
config_get_location_driver_options(),
|
|
|
|
&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);
|
|
|
|
strlcpy(
|
|
|
|
(*list)[list_info->index - 1].value.source.string,
|
|
|
|
(*list)[list_info->index - 1].value.target.string,
|
|
|
|
(*list)[list_info->index - 1].size);
|
|
|
|
(*list)[list_info->index - 1].action_left = setting_string_action_left_driver;
|
|
|
|
(*list)[list_info->index - 1].action_right = setting_string_action_right_driver;
|
|
|
|
|
|
|
|
CONFIG_STRING_OPTIONS(
|
|
|
|
list, list_info,
|
|
|
|
settings->menu.driver,
|
|
|
|
sizeof(settings->menu.driver),
|
|
|
|
menu_hash_to_str(MENU_LABEL_MENU_DRIVER),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_MENU_DRIVER),
|
|
|
|
config_get_default_menu(),
|
|
|
|
config_get_menu_driver_options(),
|
|
|
|
&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);
|
|
|
|
strlcpy(
|
|
|
|
(*list)[list_info->index - 1].value.source.string,
|
|
|
|
(*list)[list_info->index - 1].value.target.string,
|
|
|
|
(*list)[list_info->index - 1].size);
|
|
|
|
(*list)[list_info->index - 1].action_left = setting_string_action_left_driver;
|
|
|
|
(*list)[list_info->index - 1].action_right = setting_string_action_right_driver;
|
|
|
|
|
|
|
|
CONFIG_STRING_OPTIONS(
|
|
|
|
list, list_info,
|
|
|
|
settings->record.driver,
|
|
|
|
sizeof(settings->record.driver),
|
|
|
|
menu_hash_to_str(MENU_LABEL_RECORD_DRIVER),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RECORD_DRIVER),
|
|
|
|
config_get_default_record(),
|
|
|
|
config_get_record_driver_options(),
|
|
|
|
&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);
|
|
|
|
strlcpy(
|
|
|
|
(*list)[list_info->index - 1].value.source.string,
|
|
|
|
(*list)[list_info->index - 1].value.target.string,
|
|
|
|
(*list)[list_info->index - 1].size);
|
|
|
|
(*list)[list_info->index - 1].action_left = setting_string_action_left_driver;
|
|
|
|
(*list)[list_info->index - 1].action_right = setting_string_action_right_driver;
|
|
|
|
|
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
|
|
|
case SETTINGS_LIST_CORE:
|
|
|
|
START_GROUP(list, list_info, &group_info, menu_hash_to_str(MENU_LABEL_VALUE_CORE_SETTINGS), parent_group);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
|
|
|
|
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info,
|
|
|
|
parent_group);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2016-03-20 18:54:16 +00:00
|
|
|
CONFIG_BOOL(
|
|
|
|
list, list_info,
|
|
|
|
&settings->video.shared_context,
|
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_SHARED_CONTEXT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_SHARED_CONTEXT),
|
|
|
|
false,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
|
|
|
&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 18:54:16 +00:00
|
|
|
CONFIG_BOOL(
|
|
|
|
list, list_info,
|
|
|
|
&settings->load_dummy_on_core_shutdown,
|
|
|
|
menu_hash_to_str(MENU_LABEL_DUMMY_ON_CORE_SHUTDOWN),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN),
|
|
|
|
load_dummy_on_core_shutdown,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
|
|
|
&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 18:54:16 +00:00
|
|
|
CONFIG_BOOL(
|
|
|
|
list, list_info,
|
|
|
|
&settings->set_supports_no_game_enable,
|
|
|
|
menu_hash_to_str(MENU_LABEL_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE),
|
|
|
|
true,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
|
|
|
&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 18:54:16 +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-02 18:26:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool setting_append_list_configuration_options(
|
|
|
|
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
|
|
|
{
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-06-21 07:43:34 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CONFIGURATION_SETTINGS), parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-18 02:08:19 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->config_save_on_exit,
|
2015-06-20 14:48:31 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CONFIG_SAVE_ON_EXIT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CONFIG_SAVE_ON_EXIT),
|
2015-06-02 18:26:27 +00:00
|
|
|
config_save_on_exit,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->core_specific_config,
|
2015-06-20 14:48:31 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CORE_SPECIFIC_CONFIG),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CORE_SPECIFIC_CONFIG),
|
2015-06-02 18:26:27 +00:00
|
|
|
default_core_specific_config,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-11-18 02:08:19 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->game_specific_options,
|
|
|
|
menu_hash_to_str(MENU_LABEL_GAME_SPECIFIC_OPTIONS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_GAME_SPECIFIC_OPTIONS),
|
|
|
|
default_game_specific_options,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-11-15 17:29:19 +00:00
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->auto_overrides_enable,
|
2015-06-20 14:48:31 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_AUTO_OVERRIDES_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUTO_OVERRIDES_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
default_auto_overrides_enable,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->auto_remaps_enable,
|
2015-06-20 14:48:31 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_AUTO_REMAPS_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUTO_REMAPS_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
default_auto_remaps_enable,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool setting_append_list_saving_options(
|
|
|
|
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
|
|
|
{
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info, menu_hash_to_str(MENU_LABEL_VALUE_SAVING_SETTINGS), parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->sort_savefiles_enable,
|
2015-06-20 03:05:04 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_SORT_SAVEFILES_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SORT_SAVEFILES_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
default_sort_savefiles_enable,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->sort_savestates_enable,
|
2015-06-20 03:05:04 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_SORT_SAVESTATES_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SORT_SAVESTATES_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
default_sort_savestates_enable,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->block_sram_overwrite,
|
2015-06-20 02:45:39 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_BLOCK_SRAM_OVERWRITE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_BLOCK_SRAM_OVERWRITE),
|
2015-06-02 18:26:27 +00:00
|
|
|
block_sram_overwrite,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
|
|
|
#ifdef HAVE_THREADS
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->autosave_interval,
|
2015-06-20 02:45:39 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_AUTOSAVE_INTERVAL),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUTOSAVE_INTERVAL),
|
2015-06-02 18:26:27 +00:00
|
|
|
autosave_interval,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_AUTOSAVE_INIT);
|
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 0, 10, true, false);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
|
|
|
(*list)[list_info->index - 1].get_string_representation =
|
|
|
|
&setting_get_string_representation_uint_autosave_interval;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->savestate_auto_index,
|
2015-06-20 03:05:04 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_SAVESTATE_AUTO_INDEX),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SAVESTATE_AUTO_INDEX),
|
2015-06-02 18:26:27 +00:00
|
|
|
savestate_auto_index,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->savestate_auto_save,
|
2015-06-20 02:45:39 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_SAVESTATE_AUTO_SAVE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SAVESTATE_AUTO_SAVE),
|
2015-06-02 18:26:27 +00:00
|
|
|
savestate_auto_save,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
2015-06-07 23:40:25 +00:00
|
|
|
general_read_handler);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->savestate_auto_load,
|
2015-06-20 03:05:04 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_SAVESTATE_AUTO_LOAD),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SAVESTATE_AUTO_LOAD),
|
2015-06-02 18:26:27 +00:00
|
|
|
savestate_auto_load,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool setting_append_list_logging_options(
|
|
|
|
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
|
|
|
{
|
2015-12-10 11:37:24 +00:00
|
|
|
bool *tmp_b = NULL;
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info, menu_hash_to_str(MENU_LABEL_VALUE_LOGGING_SETTINGS), parent_group);
|
2015-06-15 01:57:01 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-22 19:50:39 +00:00
|
|
|
retro_main_verbosity(),
|
2015-06-20 03:05:04 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_LOG_VERBOSITY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_LOG_VERBOSITY),
|
2015-06-02 18:26:27 +00:00
|
|
|
false,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
2015-11-18 02:08:19 +00:00
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->libretro_log_level,
|
2015-06-20 03:05:04 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_LIBRETRO_LOG_LEVEL),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_LIBRETRO_LOG_LEVEL),
|
2015-06-02 18:26:27 +00:00
|
|
|
libretro_log_level,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 3, 1.0, true, true);
|
2015-06-02 18:26:27 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation =
|
|
|
|
&setting_get_string_representation_uint_libretro_log_level;
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
2015-11-18 02:08:19 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->debug_panel_enable,
|
2015-10-08 04:47:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_DEBUG_PANEL_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_DEBUG_PANEL_ENABLE),
|
|
|
|
false,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-08 04:47:45 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Performance Counters", &group_info, &subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-12-10 11:37:24 +00:00
|
|
|
runloop_ctl(RUNLOOP_CTL_GET_PERFCNT, &tmp_b);
|
|
|
|
|
2015-11-18 02:08:19 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-12-10 11:37:24 +00:00
|
|
|
tmp_b,
|
2015-06-20 03:05:04 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_PERFCNT_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_PERFCNT_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
false,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool setting_append_list_frame_throttling_options(
|
|
|
|
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
|
|
|
{
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-06-27 11:25:14 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_FRAME_THROTTLE_SETTINGS),
|
|
|
|
parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->fastforward_ratio,
|
2015-06-20 14:48:31 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_FASTFORWARD_RATIO),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_FASTFORWARD_RATIO),
|
2015-06-02 18:26:27 +00:00
|
|
|
fastforward_ratio,
|
|
|
|
"%.1fx",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-08-27 12:25:57 +00:00
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_SET_FRAME_LIMIT);
|
2015-08-27 12:39:42 +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
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->slowmotion_ratio,
|
2015-06-20 14:48:31 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_SLOWMOTION_RATIO),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SLOWMOTION_RATIO),
|
2015-06-02 18:26:27 +00:00
|
|
|
slowmotion_ratio,
|
|
|
|
"%.1fx",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 1, 10, 1.0, true, true);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-02-24 20:24:32 +00:00
|
|
|
CONFIG_BOOL(
|
|
|
|
list, list_info,
|
|
|
|
&settings->menu.throttle_framerate,
|
|
|
|
menu_hash_to_str(MENU_LABEL_MENU_THROTTLE_FRAMERATE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_MENU_THROTTLE_FRAMERATE),
|
|
|
|
true,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool setting_append_list_rewind_options(
|
|
|
|
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
|
|
|
{
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info, menu_hash_to_str(MENU_LABEL_VALUE_REWIND_SETTINGS), parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->rewind_enable,
|
2015-06-19 15:02:27 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_REWIND_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_REWIND_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
rewind_enable,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_REWIND_TOGGLE);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
2015-10-12 14:47:34 +00:00
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
#if 0
|
|
|
|
CONFIG_SIZE(
|
|
|
|
settings->rewind_buffer_size,
|
|
|
|
"rewind_buffer_size",
|
|
|
|
"Rewind Buffer Size",
|
|
|
|
rewind_buffer_size,
|
2015-11-21 15:32:22 +00:00
|
|
|
group_info,
|
|
|
|
subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler)
|
|
|
|
#endif
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->rewind_granularity,
|
2015-06-19 06:25:39 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_REWIND_GRANULARITY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_REWIND_GRANULARITY),
|
2015-06-02 18:26:27 +00:00
|
|
|
rewind_granularity,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 1, 32768, 1, true, false);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
2015-07-05 19:12:52 +00:00
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
static bool setting_append_list_recording_options(
|
|
|
|
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
|
|
|
{
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
global_t *global = global_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-06-25 18:06:11 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RECORDING_SETTINGS),
|
|
|
|
parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
recording_is_enabled(),
|
2015-06-20 23:26:25 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RECORD_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RECORD_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
false,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_PATH(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
global->record.config,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(global->record.config),
|
2015-06-20 23:26:25 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RECORD_CONFIG),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RECORD_CONFIG),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_values(list, list_info, "cfg");
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
|
|
|
|
|
|
|
CONFIG_STRING(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
global->record.path,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(global->record.path),
|
2015-06-20 23:26:25 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RECORD_PATH),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RECORD_PATH),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&global->record.use_output_dir,
|
2015-06-20 23:26:25 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RECORD_USE_OUTPUT_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RECORD_USE_OUTPUT_DIRECTORY),
|
2015-06-02 18:26:27 +00:00
|
|
|
false,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Miscellaneous", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->video.post_filter_record,
|
2015-06-20 23:26:25 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_POST_FILTER_RECORD),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_POST_FILTER_RECORD),
|
2015-06-02 18:26:27 +00:00
|
|
|
post_filter_record,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->video.gpu_record,
|
2015-06-20 23:26:25 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_GPU_RECORD),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_GPU_RECORD),
|
2015-06-02 18:26:27 +00:00
|
|
|
gpu_record,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool setting_append_list_video_options(
|
|
|
|
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
|
|
|
{
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info, menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_SETTINGS), parent_group);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-10-20 15:51:03 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->ui.suspend_screensaver_enable,
|
2015-10-20 15:51:03 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_SUSPEND_SCREENSAVER_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SUSPEND_SCREENSAVER_ENABLE),
|
|
|
|
true,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-20 15:51:03 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
CONFIG_BOOL(
|
|
|
|
list, list_info,
|
|
|
|
&settings->fps_show,
|
2015-06-19 14:56:01 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_FPS_SHOW),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_FPS_SHOW),
|
2015-06-02 18:26:27 +00:00
|
|
|
fps_show,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-11-21 10:22:34 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Platform-specific", &group_info, &subgroup_info, parent_group);
|
2015-11-21 10:22:34 +00:00
|
|
|
|
2015-11-21 15:32:22 +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
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 10:22:34 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Monitor", &group_info, &subgroup_info, parent_group);
|
2015-06-24 04:09:03 +00:00
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->video.monitor_index,
|
2015-06-19 22:31:43 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_MONITOR_INDEX),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_MONITOR_INDEX),
|
2015-06-02 18:26:27 +00:00
|
|
|
monitor_index,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_REINIT);
|
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 1, 1, true, false);
|
2015-06-02 18:26:27 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation =
|
|
|
|
&setting_get_string_representation_uint_video_monitor_index;
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
2015-11-20 14:20:54 +00:00
|
|
|
if (video_driver_ctl(RARCH_DISPLAY_CTL_HAS_WINDOWED, NULL))
|
2015-07-09 00:45:37 +00:00
|
|
|
{
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->video.fullscreen,
|
2015-07-09 00:45:37 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_FULLSCREEN),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_FULLSCREEN),
|
|
|
|
fullscreen,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-07-09 00:45:37 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_REINIT);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
|
|
|
}
|
2015-11-20 14:20:54 +00:00
|
|
|
if (video_driver_ctl(RARCH_DISPLAY_CTL_HAS_WINDOWED, NULL))
|
2015-07-09 00:45:37 +00:00
|
|
|
{
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->video.windowed_fullscreen,
|
2015-07-09 00:45:37 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_WINDOWED_FULLSCREEN),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_WINDOWED_FULLSCREEN),
|
|
|
|
windowed_fullscreen,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-07-09 00:45:37 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->video.refresh_rate,
|
2015-06-21 00:25:17 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_REFRESH_RATE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_REFRESH_RATE),
|
2015-06-02 18:26:27 +00:00
|
|
|
refresh_rate,
|
|
|
|
"%.3f Hz",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 0, 0.001, true, false);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->video.refresh_rate,
|
2015-06-20 14:48:31 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_REFRESH_RATE_AUTO),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_REFRESH_RATE_AUTO),
|
2015-06-02 18:26:27 +00:00
|
|
|
refresh_rate,
|
|
|
|
"%.3f Hz",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-06 14:26:55 +00:00
|
|
|
(*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;
|
2015-06-02 18:26:27 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation =
|
|
|
|
&setting_get_string_representation_st_float_video_refresh_rate_auto;
|
|
|
|
|
2016-01-20 03:54:17 +00:00
|
|
|
if (string_is_equal(settings->video.driver, "gl"))
|
2015-07-12 16:44:48 +00:00
|
|
|
{
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->video.force_srgb_disable,
|
2015-07-12 16:44:48 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_FORCE_SRGB_DISABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_FORCE_SRGB_DISABLE),
|
|
|
|
false,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-07-12 16:44:48 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_REINIT);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO|SD_FLAG_ADVANCED);
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Aspect", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->video.aspect_ratio_idx,
|
2015-06-21 00:25:17 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_ASPECT_RATIO_INDEX),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX),
|
2015-06-02 18:26:27 +00:00
|
|
|
aspect_ratio_idx,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_cmd(
|
2015-06-02 18:26:27 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
EVENT_CMD_VIDEO_SET_ASPECT_RATIO);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(
|
2015-06-02 18:26:27 +00:00
|
|
|
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 =
|
|
|
|
&setting_get_string_representation_uint_aspect_ratio_index;
|
|
|
|
|
2015-09-27 15:49:27 +00:00
|
|
|
CONFIG_INT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->video_viewport_custom.x,
|
2015-09-27 15:49:27 +00:00
|
|
|
"video_viewport_custom_x",
|
|
|
|
"Custom Viewport X",
|
|
|
|
0,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-09-27 15:49:27 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-09-27 15:51:25 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, -99999, 0, 1, false, false);
|
2015-09-27 16:14:55 +00:00
|
|
|
menu_settings_list_current_add_cmd(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
EVENT_CMD_VIDEO_APPLY_STATE_CHANGES);
|
2015-09-27 15:49:27 +00:00
|
|
|
|
|
|
|
CONFIG_INT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->video_viewport_custom.y,
|
2015-09-27 15:49:27 +00:00
|
|
|
"video_viewport_custom_y",
|
|
|
|
"Custom Viewport Y",
|
|
|
|
0,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-09-27 15:49:27 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-09-27 15:51:25 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, -99999, 0, 1, false, false);
|
2015-09-27 16:14:55 +00:00
|
|
|
menu_settings_list_current_add_cmd(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
EVENT_CMD_VIDEO_APPLY_STATE_CHANGES);
|
2015-09-27 15:49:27 +00:00
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->video_viewport_custom.width,
|
2015-09-27 15:49:27 +00:00
|
|
|
"video_viewport_custom_width",
|
|
|
|
"Custom Viewport Width",
|
|
|
|
0,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-09-27 15:49:27 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-09-27 17:45:42 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 0, 1, true, false);
|
|
|
|
(*list)[list_info->index - 1].action_start = &setting_action_start_custom_viewport_width;
|
2015-09-27 16:14:55 +00:00
|
|
|
(*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,
|
|
|
|
EVENT_CMD_VIDEO_APPLY_STATE_CHANGES);
|
2015-09-27 15:49:27 +00:00
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->video_viewport_custom.height,
|
2015-09-27 15:49:27 +00:00
|
|
|
"video_viewport_custom_height",
|
|
|
|
"Custom Viewport Height",
|
|
|
|
0,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-09-27 15:49:27 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-09-27 17:45:42 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 0, 1, true, false);
|
|
|
|
(*list)[list_info->index - 1].action_start = &setting_action_start_custom_viewport_height;
|
2015-09-27 16:14:55 +00:00
|
|
|
(*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,
|
|
|
|
EVENT_CMD_VIDEO_APPLY_STATE_CHANGES);
|
2015-09-27 15:49:27 +00:00
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Scaling", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-20 14:20:54 +00:00
|
|
|
if (video_driver_ctl(RARCH_DISPLAY_CTL_HAS_WINDOWED, NULL))
|
2015-07-09 00:45:37 +00:00
|
|
|
{
|
|
|
|
CONFIG_FLOAT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->video.scale,
|
2015-07-09 00:45:37 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_SCALE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_SCALE),
|
|
|
|
scale,
|
|
|
|
"%.1fx",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-07-09 00:45:37 +00:00
|
|
|
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);
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->video.scale_integer,
|
2015-06-20 03:13:47 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_SCALE_INTEGER),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_SCALE_INTEGER),
|
2015-06-02 18:26:27 +00:00
|
|
|
scale_integer,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-09-27 17:57:15 +00:00
|
|
|
menu_settings_list_current_add_cmd(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
EVENT_CMD_VIDEO_APPLY_STATE_CHANGES);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
#ifdef GEKKO
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->video.viwidth,
|
2015-06-21 00:25:17 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_VI_WIDTH),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_VI_WIDTH),
|
2015-06-02 18:26:27 +00:00
|
|
|
video_viwidth,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 640, 720, 2, true, true);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->video.vfilter,
|
2015-06-21 00:25:17 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_VFILTER),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_VFILTER),
|
2015-06-02 18:26:27 +00:00
|
|
|
video_vfilter,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->video.smooth,
|
2015-06-20 03:51:47 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_SMOOTH),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_SMOOTH),
|
2015-06-02 18:26:27 +00:00
|
|
|
video_smooth,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->video.rotation,
|
2015-06-20 03:51:47 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_ROTATION),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_ROTATION),
|
2015-06-02 18:26:27 +00:00
|
|
|
0,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
|
2015-06-02 18:26:27 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation =
|
|
|
|
&setting_get_string_representation_uint_video_rotation;
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
START_SUB_GROUP(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
"Synchronization",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
#if defined(HAVE_THREADS) && !defined(RARCH_CONSOLE)
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->video.threaded,
|
2015-06-20 03:51:47 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_THREADED),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_THREADED),
|
2015-06-02 18:26:27 +00:00
|
|
|
video_threaded,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_REINIT);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO|SD_FLAG_ADVANCED);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->video.vsync,
|
2015-06-20 03:51:47 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_VSYNC),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_VSYNC),
|
2015-06-02 18:26:27 +00:00
|
|
|
vsync,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->video.swap_interval,
|
2015-06-20 03:51:47 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_SWAP_INTERVAL),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_SWAP_INTERVAL),
|
2015-06-02 18:26:27 +00:00
|
|
|
swap_interval,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_VIDEO_SET_BLOCKING_STATE);
|
|
|
|
menu_settings_list_current_add_range(list, list_info, 1, 4, 1, true, true);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO|SD_FLAG_ADVANCED);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->video.hard_sync,
|
2015-06-20 03:51:47 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_HARD_SYNC),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_HARD_SYNC),
|
2015-06-02 18:26:27 +00:00
|
|
|
hard_sync,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->video.hard_sync_frames,
|
2015-06-20 03:30:11 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_HARD_SYNC_FRAMES),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_HARD_SYNC_FRAMES),
|
2015-06-02 18:26:27 +00:00
|
|
|
hard_sync_frames,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->video.frame_delay,
|
2015-06-19 22:29:07 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_FRAME_DELAY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_FRAME_DELAY),
|
2015-06-02 18:26:27 +00:00
|
|
|
frame_delay,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 15, 1, true, true);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
|
|
|
#if !defined(RARCH_MOBILE)
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->video.black_frame_insertion,
|
2015-06-20 03:30:11 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_BLACK_FRAME_INSERTION),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_BLACK_FRAME_INSERTION),
|
2015-06-02 18:26:27 +00:00
|
|
|
black_frame_insertion,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
#endif
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
START_SUB_GROUP(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
"Miscellaneous",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->video.gpu_screenshot,
|
2015-06-20 03:51:47 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_GPU_SCREENSHOT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_GPU_SCREENSHOT),
|
2015-06-02 18:26:27 +00:00
|
|
|
gpu_screenshot,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->video.allow_rotate,
|
2015-06-20 03:51:47 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_ALLOW_ROTATE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_ALLOW_ROTATE),
|
2015-06-02 18:26:27 +00:00
|
|
|
allow_rotate,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->video.crop_overscan,
|
2015-06-20 03:30:11 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_CROP_OVERSCAN),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_CROP_OVERSCAN),
|
2015-06-02 18:26:27 +00:00
|
|
|
crop_overscan,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
|
2015-06-22 05:31:45 +00:00
|
|
|
CONFIG_PATH(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-22 05:31:45 +00:00
|
|
|
settings->video.softfilter_plugin,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->video.softfilter_plugin),
|
2015-06-22 05:31:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_FILTER),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_FILTER),
|
|
|
|
settings->video.filter_dir,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-22 05:31:45 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
menu_settings_list_current_add_values(list, list_info, "filt");
|
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_REINIT);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool setting_append_list_font_options(
|
|
|
|
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
|
|
|
{
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-06-25 18:06:11 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ONSCREEN_DISPLAY_SETTINGS),
|
|
|
|
parent_group);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Messages",
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-04 13:49:21 +00:00
|
|
|
#ifndef RARCH_CONSOLE
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->video.font_enable,
|
2015-06-21 05:29:02 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_FONT_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_FONT_ENABLE),
|
2015-06-04 13:49:21 +00:00
|
|
|
font_enable,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-04 13:49:21 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
#endif
|
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
CONFIG_PATH(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->video.font_path,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->video.font_path),
|
2015-06-21 05:29:02 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_FONT_PATH),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_FONT_PATH),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->video.font_size,
|
2015-06-21 05:29:02 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_FONT_SIZE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_FONT_SIZE),
|
2015-06-02 18:26:27 +00:00
|
|
|
font_size,
|
|
|
|
"%.1f",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
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
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->video.msg_pos_x,
|
2015-06-21 05:29:02 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_MESSAGE_POS_X),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_MESSAGE_POS_X),
|
2015-06-02 18:26:27 +00:00
|
|
|
message_pos_offset_x,
|
|
|
|
"%.3f",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 1, 0.01, true, true);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->video.msg_pos_y,
|
2015-06-21 05:29:02 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_MESSAGE_POS_Y),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_MESSAGE_POS_Y),
|
2015-06-02 18:26:27 +00:00
|
|
|
message_pos_offset_y,
|
|
|
|
"%.3f",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 1, 0.01, true, true);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool setting_append_list_audio_options(
|
|
|
|
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
|
|
|
{
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
global_t *global = global_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-06-25 15:00:58 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_SETTINGS), parent_group);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
(void)global;
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->audio.enable,
|
2015-06-19 14:56:01 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_AUDIO_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
audio_enable,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 15:56:16 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->audio.mute_enable,
|
2015-06-19 14:38:05 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_AUDIO_MUTE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_MUTE),
|
2015-06-02 18:26:27 +00:00
|
|
|
false,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->audio.volume,
|
2015-06-19 14:38:05 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_AUDIO_VOLUME),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_VOLUME),
|
2015-06-02 18:26:27 +00:00
|
|
|
audio_volume,
|
|
|
|
"%.1f",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, -80, 12, 1.0, true, true);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
#ifdef __CELLOS_LV2__
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&global->console.sound.system_bgm_enable,
|
2015-06-20 23:57:05 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_SYSTEM_BGM_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_BGM_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
false,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
#endif
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
START_SUB_GROUP(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
"Synchronization",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->audio.sync,
|
2015-06-19 14:38:05 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_AUDIO_SYNC),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_SYNC),
|
2015-06-02 18:26:27 +00:00
|
|
|
audio_sync,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->audio.latency,
|
2015-06-19 06:10:11 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_AUDIO_LATENCY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_LATENCY),
|
2015-06-02 18:26:27 +00:00
|
|
|
g_defaults.settings.out_latency ?
|
|
|
|
g_defaults.settings.out_latency : out_latency,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2016-02-08 15:43:24 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 8, 512, 16.0, true, true);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->audio.rate_control_delta,
|
2015-06-19 14:38:05 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_AUDIO_RATE_CONTROL_DELTA),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_RATE_CONTROL_DELTA),
|
2015-06-02 18:26:27 +00:00
|
|
|
rate_control_delta,
|
|
|
|
"%.3f",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(
|
2015-06-02 18:26:27 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0.001,
|
|
|
|
true,
|
|
|
|
false);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->audio.max_timing_skew,
|
2015-06-19 22:24:50 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_AUDIO_MAX_TIMING_SKEW),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_MAX_TIMING_SKEW),
|
2015-06-02 18:26:27 +00:00
|
|
|
max_timing_skew,
|
|
|
|
"%.2f",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(
|
2015-06-02 18:26:27 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
0.01,
|
|
|
|
0.5,
|
|
|
|
0.01,
|
|
|
|
true,
|
|
|
|
true);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->audio.block_frames,
|
2015-06-20 23:57:05 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_AUDIO_BLOCK_FRAMES),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES),
|
2015-06-02 18:26:27 +00:00
|
|
|
0,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
START_SUB_GROUP(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
"Miscellaneous",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_STRING(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->audio.device,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->audio.device),
|
2015-06-19 00:13:27 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_AUDIO_DEVICE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_DEVICE),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT | SD_FLAG_ADVANCED);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->audio.out_rate,
|
2015-06-19 22:24:50 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_AUDIO_OUTPUT_RATE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_OUTPUT_RATE),
|
2015-06-02 18:26:27 +00:00
|
|
|
out_rate,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
|
|
|
CONFIG_PATH(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->audio.dsp_plugin,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->audio.dsp_plugin),
|
2015-06-19 05:39:13 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_AUDIO_DSP_PLUGIN),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_DSP_PLUGIN),
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->audio.filter_dir,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_values(list, list_info, "dsp");
|
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_DSP_FILTER_INIT);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-06-04 12:39:40 +00:00
|
|
|
static bool setting_append_list_input_hotkey_options(
|
|
|
|
rarch_setting_t **list,
|
2015-06-07 23:40:25 +00:00
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
const char *parent_group)
|
2015-06-04 12:39:40 +00:00
|
|
|
{
|
|
|
|
unsigned i;
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-04 12:39:40 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-10-25 09:41:53 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_HOTKEY_BINDS_BEGIN),
|
2015-06-27 11:25:14 +00:00
|
|
|
parent_group);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group);
|
2015-06-04 12:39:40 +00:00
|
|
|
|
|
|
|
for (i = 0; i < RARCH_BIND_LIST_END; i ++)
|
|
|
|
{
|
2015-11-28 01:13:27 +00:00
|
|
|
if (!input_config_bind_map_get_meta(i))
|
2015-06-04 12:39:40 +00:00
|
|
|
continue;
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
CONFIG_BIND(
|
|
|
|
list, list_info,
|
|
|
|
&settings->input.binds[0][i], 0, 0,
|
2015-11-28 01:13:27 +00:00
|
|
|
strdup(input_config_bind_map_get_base(i)),
|
|
|
|
strdup(input_config_bind_map_get_desc(i)),
|
2015-11-27 23:51:33 +00:00
|
|
|
&retro_keybinds_1[i],
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info, &subgroup_info, parent_group);
|
2015-08-17 15:55:44 +00:00
|
|
|
(*list)[list_info->index - 1].bind_type = i + MENU_SETTINGS_BIND_BEGIN;
|
2015-06-04 12:39:40 +00:00
|
|
|
}
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-04 12:39:40 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-06-04 15:41:07 +00:00
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
static bool setting_append_list_input_options(
|
|
|
|
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
|
|
|
{
|
2015-06-04 15:42:25 +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};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-10-24 08:31:11 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_SETTINGS_BEGIN),
|
2015-06-25 15:00:58 +00:00
|
|
|
parent_group);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->input.max_users,
|
2015-06-19 22:24:50 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_MAX_USERS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_MAX_USERS),
|
2015-06-25 16:43:01 +00:00
|
|
|
input_max_users,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 1, MAX_USERS, 1, true, true);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-01-27 00:51:09 +00:00
|
|
|
CONFIG_UINT(
|
|
|
|
list, list_info,
|
|
|
|
&settings->input.poll_type_behavior,
|
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_POLL_TYPE_BEHAVIOR),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR),
|
|
|
|
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);
|
|
|
|
|
2015-11-22 13:07:24 +00:00
|
|
|
#if TARGET_OS_IPHONE
|
2015-11-13 00:50:22 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->input.keyboard_gamepad_enable,
|
2015-11-13 00:50:22 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_ICADE_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_ICADE_ENABLE),
|
2015-11-13 21:11:39 +00:00
|
|
|
false,
|
2015-11-13 00:50:22 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-11-13 00:50:22 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-11-13 21:11:39 +00:00
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->input.keyboard_gamepad_mapping_type,
|
2015-11-13 21:11:39 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE),
|
|
|
|
1,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-11-13 21:11:39 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-11-15 01:26:31 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
|
2015-11-13 21:11:39 +00:00
|
|
|
|
2015-11-13 00:50:22 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->input.small_keyboard_enable,
|
2015-11-13 00:50:22 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_SMALL_KEYBOARD_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_SMALL_KEYBOARD_ENABLE),
|
|
|
|
false,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-11-13 00:50:22 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
#endif
|
|
|
|
|
2015-07-11 01:13:38 +00:00
|
|
|
#ifdef ANDROID
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->input.back_as_menu_toggle_enable,
|
2015-07-11 01:13:38 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_BACK_AS_MENU_TOGGLE_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_BACK_AS_MENU_TOGGLE_ENABLE),
|
|
|
|
back_as_menu_toggle_enable,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-07-11 01:13:38 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
#endif
|
|
|
|
|
2015-07-09 04:27:17 +00:00
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->input.menu_toggle_gamepad_combo,
|
2015-07-09 04:27:17 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_MENU_TOGGLE_GAMEPAD_COMBO),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_MENU_TOGGLE_GAMEPAD_COMBO),
|
|
|
|
menu_toggle_gamepad_combo,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-07-09 04:27:17 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 2, 1, true, true);
|
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->input.remap_binds_enable,
|
2015-06-19 22:24:50 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_REMAP_BINDS_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
true,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->input.autodetect_enable,
|
2015-06-19 22:24:50 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_AUTODETECT_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_AUTODETECT_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
input_autodetect_enable,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->input.input_descriptor_label_show,
|
2015-06-20 23:50:37 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW),
|
2015-11-07 15:11:30 +00:00
|
|
|
true,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-15 23:00:30 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->input.input_descriptor_hide_unbound,
|
2015-06-20 23:50:37 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_DESCRIPTOR_HIDE_UNBOUND),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND),
|
2015-06-02 18:26:27 +00:00
|
|
|
input_descriptor_hide_unbound,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-15 23:00:30 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-10-30 13:36:04 +00:00
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
START_SUB_GROUP(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
"Turbo/Deadzone",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->input.axis_threshold,
|
2015-06-19 22:24:50 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_AXIS_THRESHOLD),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_AXIS_THRESHOLD),
|
2015-06-02 18:26:27 +00:00
|
|
|
axis_threshold,
|
|
|
|
"%.3f",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 1.00, 0.001, true, true);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->input.turbo_period,
|
2015-06-19 22:24:50 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_TURBO_PERIOD),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_TURBO_PERIOD),
|
2015-06-02 18:26:27 +00:00
|
|
|
turbo_period,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 1, 0, 1, true, false);
|
2015-10-24 08:31:11 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->input.turbo_duty_cycle,
|
2015-06-19 22:24:50 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_DUTY_CYCLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_DUTY_CYCLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
turbo_duty_cycle,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 1, 0, 1, true, false);
|
2015-10-24 08:31:11 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-10-23 04:54:33 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Binds", &group_info, &subgroup_info, parent_group);
|
2015-10-23 04:54:33 +00:00
|
|
|
|
2015-10-25 09:41:53 +00:00
|
|
|
CONFIG_ACTION(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-10-25 09:41:53 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_HOTKEY_BINDS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_HOTKEY_BINDS),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-25 09:41:53 +00:00
|
|
|
parent_group);
|
|
|
|
|
2015-10-23 04:54:33 +00:00
|
|
|
for (user = 0; user < MAX_USERS; user++)
|
|
|
|
{
|
|
|
|
static char binds_list[MAX_USERS][PATH_MAX_LENGTH];
|
|
|
|
static char binds_label[MAX_USERS][PATH_MAX_LENGTH];
|
|
|
|
|
|
|
|
snprintf(binds_list[user], sizeof(binds_list[user]), "%d_input_binds_list", user + 1);
|
|
|
|
snprintf(binds_label[user], sizeof(binds_label[user]), "Input User %d Binds", user + 1);
|
|
|
|
|
|
|
|
CONFIG_ACTION(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-10-23 04:54:33 +00:00
|
|
|
binds_list[user],
|
|
|
|
binds_label[user],
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-23 04:54:33 +00:00
|
|
|
parent_group);
|
|
|
|
(*list)[list_info->index - 1].index = user + 1;
|
|
|
|
(*list)[list_info->index - 1].index_offset = user;
|
|
|
|
}
|
|
|
|
|
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool setting_append_list_overlay_options(
|
|
|
|
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
|
|
|
{
|
|
|
|
#ifdef HAVE_OVERLAY
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
global_t *global = global_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-06-25 18:06:11 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_OVERLAY_SETTINGS),
|
|
|
|
parent_group);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->input.overlay_enable,
|
2015-06-19 22:55:10 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_OVERLAY_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_OVERLAY_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
true,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
(*list)[list_info->index - 1].change_handler = overlay_enable_toggle_change_handler;
|
|
|
|
|
2015-07-03 17:27:16 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->input.overlay_enable_autopreferred,
|
2015-07-03 17:27:16 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_OVERLAY_AUTOLOAD_PREFERRED),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_OVERLAY_AUTOLOAD_PREFERRED),
|
|
|
|
true,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-07-03 17:27:16 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
(*list)[list_info->index - 1].change_handler = overlay_enable_toggle_change_handler;
|
|
|
|
|
2015-07-09 02:05:59 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->input.overlay_hide_in_menu,
|
2015-07-09 02:05:59 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_OVERLAY_HIDE_IN_MENU),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_OVERLAY_HIDE_IN_MENU),
|
|
|
|
overlay_hide_in_menu,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-07-09 02:05:59 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
(*list)[list_info->index - 1].change_handler = overlay_enable_toggle_change_handler;
|
|
|
|
|
2015-06-15 22:58:13 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->osk.enable,
|
2015-06-19 22:55:10 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_OSK_OVERLAY_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_OSK_OVERLAY_ENABLE),
|
2015-06-15 22:58:13 +00:00
|
|
|
true,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-15 22:58:13 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
CONFIG_PATH(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->input.overlay,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->input.overlay),
|
2015-06-15 23:14:44 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_OVERLAY_PRESET),
|
2015-06-19 06:10:11 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_OVERLAY_PRESET),
|
2015-09-26 17:21:32 +00:00
|
|
|
settings->overlay_directory,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_values(list, list_info, "cfg");
|
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_OVERLAY_INIT);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->input.overlay_opacity,
|
2015-06-15 23:14:44 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_OVERLAY_OPACITY),
|
2015-06-19 00:13:27 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_OVERLAY_OPACITY),
|
2015-06-02 18:26:27 +00:00
|
|
|
0.7f,
|
|
|
|
"%.2f",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_OVERLAY_SET_ALPHA_MOD);
|
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 1, 0.01, true, true);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->input.overlay_scale,
|
2015-06-15 23:14:44 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_OVERLAY_SCALE),
|
2015-06-19 00:13:27 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_OVERLAY_SCALE),
|
2015-06-02 18:26:27 +00:00
|
|
|
1.0f,
|
|
|
|
"%.2f",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_OVERLAY_SET_SCALE_FACTOR);
|
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 2, 0.01, true, true);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Onscreen Keyboard Overlay", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_PATH(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->osk.overlay,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->osk.overlay),
|
2015-06-15 23:14:44 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_KEYBOARD_OVERLAY_PRESET),
|
2015-06-19 00:13:27 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_KEYBOARD_OVERLAY_PRESET),
|
2015-07-27 15:18:10 +00:00
|
|
|
global->dir.osk_overlay,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_values(list, list_info, "cfg");
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool setting_append_list_menu_options(
|
|
|
|
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
|
|
|
{
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-06-25 18:06:11 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_MENU_SETTINGS),
|
|
|
|
parent_group);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_PATH(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->menu.wallpaper,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->menu.wallpaper),
|
2015-06-19 05:29:42 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_MENU_WALLPAPER),
|
2015-06-15 23:14:44 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_MENU_WALLPAPER),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_values(list, list_info, "png");
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
|
|
|
|
2015-06-04 10:17:23 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->menu.dynamic_wallpaper_enable,
|
2015-06-19 05:29:42 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_DYNAMIC_WALLPAPER),
|
2015-06-15 23:14:44 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_DYNAMIC_WALLPAPER),
|
2015-06-04 10:17:23 +00:00
|
|
|
true,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-04 10:17:23 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-06-18 02:32:56 +00:00
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->menu.pause_libretro,
|
2015-06-19 22:55:10 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_PAUSE_LIBRETRO),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_PAUSE_LIBRETRO),
|
2015-06-02 18:26:27 +00:00
|
|
|
true,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_MENU_PAUSE_LIBRETRO);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->menu.mouse.enable,
|
2015-06-20 16:35:53 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_MOUSE_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_MOUSE_ENABLE),
|
2015-11-01 15:38:04 +00:00
|
|
|
def_mouse_enable,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->menu.pointer.enable,
|
2015-06-20 16:35:53 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_POINTER_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_POINTER_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
pointer_enable,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2016-02-27 23:30:12 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
|
|
|
list, list_info,
|
|
|
|
&settings->menu.linear_filter,
|
|
|
|
menu_hash_to_str(MENU_LABEL_MENU_LINEAR_FILTER),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_MENU_LINEAR_FILTER),
|
|
|
|
true,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-07-11 01:28:50 +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
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Navigation", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->menu.navigation.wraparound.enable,
|
2015-10-25 01:59:38 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_NAVIGATION_WRAPAROUND),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NAVIGATION_WRAPAROUND),
|
2015-06-02 18:26:27 +00:00
|
|
|
true,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Settings View", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->menu.show_advanced_settings,
|
2015-06-20 17:28:50 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_SHOW_ADVANCED_SETTINGS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SHOW_ADVANCED_SETTINGS),
|
2015-06-02 18:26:27 +00:00
|
|
|
show_advanced_settings,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
#ifdef HAVE_THREADS
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->threaded_data_runloop_enable,
|
2015-06-20 17:28:50 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_THREADED_DATA_RUNLOOP_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
threaded_data_runloop_enable,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-14 18:12:18 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2015-06-02 18:26:27 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* These colors are hints. The menu driver is not required to use them. */
|
|
|
|
CONFIG_HEX(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->menu.entry_normal_color,
|
2015-06-20 17:28:50 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_ENTRY_NORMAL_COLOR),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ENTRY_NORMAL_COLOR),
|
2015-06-02 18:26:27 +00:00
|
|
|
menu_entry_normal_color,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
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);
|
|
|
|
|
|
|
|
CONFIG_HEX(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->menu.entry_hover_color,
|
2015-06-20 17:46:13 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_ENTRY_HOVER_COLOR),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ENTRY_HOVER_COLOR),
|
2015-06-02 18:26:27 +00:00
|
|
|
menu_entry_hover_color,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
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);
|
|
|
|
|
|
|
|
CONFIG_HEX(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->menu.title_color,
|
2015-06-20 17:46:13 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_TITLE_COLOR),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_TITLE_COLOR),
|
2015-06-02 18:26:27 +00:00
|
|
|
menu_title_color,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
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-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-06-22 01:07:32 +00:00
|
|
|
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Display", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-02-08 05:34:13 +00:00
|
|
|
/* only glui uses these values, don't show them on other drivers */
|
2016-02-17 06:29:10 +00:00
|
|
|
if (string_is_equal(settings->menu.driver, "glui"))
|
2016-02-08 05:34:13 +00:00
|
|
|
{
|
|
|
|
CONFIG_BOOL(
|
|
|
|
list, list_info,
|
|
|
|
&settings->menu.dpi.override_enable,
|
|
|
|
menu_hash_to_str(MENU_LABEL_DPI_OVERRIDE_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_DPI_OVERRIDE_ENABLE),
|
|
|
|
menu_dpi_override_enable,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-02-08 05:34:13 +00:00
|
|
|
CONFIG_UINT(
|
|
|
|
list, list_info,
|
|
|
|
&settings->menu.dpi.override_value,
|
|
|
|
menu_hash_to_str(MENU_LABEL_DPI_OVERRIDE_VALUE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_DPI_OVERRIDE_VALUE),
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
/* only XMB uses these values, don't show them on other drivers */
|
2016-02-17 06:29:10 +00:00
|
|
|
if (string_is_equal(settings->menu.driver, "xmb"))
|
2016-02-08 05:34:13 +00:00
|
|
|
{
|
|
|
|
CONFIG_UINT(
|
|
|
|
list, list_info,
|
|
|
|
&settings->menu.xmb_alpha_factor,
|
|
|
|
menu_hash_to_str(MENU_LABEL_XMB_ALPHA_FACTOR),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_XMB_ALPHA_FACTOR),
|
|
|
|
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);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
|
|
|
list, list_info,
|
|
|
|
&settings->menu.xmb_scale_factor,
|
|
|
|
menu_hash_to_str(MENU_LABEL_XMB_SCALE_FACTOR),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_XMB_SCALE_FACTOR),
|
|
|
|
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-02-08 06:08:03 +00:00
|
|
|
|
|
|
|
CONFIG_PATH(
|
|
|
|
list, list_info,
|
|
|
|
settings->menu.xmb_font,
|
|
|
|
sizeof(settings->menu.xmb_font),
|
|
|
|
menu_hash_to_str(MENU_LABEL_XMB_FONT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_XMB_FONT),
|
|
|
|
settings->menu.xmb_font,
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
2016-02-08 05:34:13 +00:00
|
|
|
}
|
2015-06-22 01:07:32 +00:00
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->menu_show_start_screen,
|
2015-06-20 17:46:13 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RGUI_SHOW_START_SCREEN),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RGUI_SHOW_START_SCREEN),
|
2016-01-11 12:26:41 +00:00
|
|
|
default_menu_show_start_screen,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-06-20 17:46:13 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->menu.boxart_enable,
|
2015-06-20 17:46:13 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_BOXART),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_BOXART),
|
|
|
|
true,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-20 17:46:13 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->menu.timedate_enable,
|
2015-06-20 17:46:13 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_TIMEDATE_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_TIMEDATE_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
true,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->menu.core_enable,
|
2015-06-20 16:35:53 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CORE_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CORE_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
true,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-06-30 13:45:10 +00:00
|
|
|
#if defined(HAVE_IMAGEVIEWER) || defined(HAVE_FFMPEG)
|
2015-06-28 14:52:11 +00:00
|
|
|
static bool setting_append_list_multimedia_options(
|
2015-06-23 05:09:24 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
const char *parent_group)
|
|
|
|
{
|
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
|
|
|
settings_t *settings = config_get_ptr();
|
2015-06-28 16:57:06 +00:00
|
|
|
|
|
|
|
(void)settings;
|
2015-06-23 05:09:24 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-06-28 14:52:11 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_MULTIMEDIA_SETTINGS),
|
2015-06-25 18:06:11 +00:00
|
|
|
parent_group);
|
2015-06-23 05:09:24 +00:00
|
|
|
|
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
2015-06-23 05:09:24 +00:00
|
|
|
|
2016-01-20 03:54:17 +00:00
|
|
|
if (!string_is_equal(settings->record.driver, "null"))
|
2015-07-05 19:12:52 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->multimedia.builtin_mediaplayer_enable,
|
2015-07-05 19:12:52 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_USE_BUILTIN_PLAYER),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_USE_BUILTIN_PLAYER),
|
|
|
|
true,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-07-05 19:12:52 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-06-23 05:09:24 +00:00
|
|
|
|
2015-06-28 16:55:00 +00:00
|
|
|
#ifdef HAVE_IMAGEVIEWER
|
2015-06-28 15:21:32 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->multimedia.builtin_imageviewer_enable,
|
2015-06-28 15:21:32 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_USE_BUILTIN_IMAGE_VIEWER),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_USE_BUILTIN_IMAGE_VIEWER),
|
|
|
|
true,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-28 15:21:32 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-28 16:55:00 +00:00
|
|
|
#endif
|
2015-06-28 15:21:32 +00:00
|
|
|
|
2015-06-23 05:09:24 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
2015-06-30 13:45:10 +00:00
|
|
|
#endif
|
2015-06-23 05:09:24 +00:00
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
static bool setting_append_list_ui_options(
|
|
|
|
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
|
|
|
{
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-06-25 18:06:11 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_UI_SETTINGS),
|
|
|
|
parent_group);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->video.disable_composition,
|
2015-06-20 16:35:53 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_DISABLE_COMPOSITION),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION),
|
2015-06-02 18:26:27 +00:00
|
|
|
disable_composition,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_REINIT);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->pause_nonactive,
|
2015-06-20 16:35:53 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_PAUSE_NONACTIVE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_PAUSE_NONACTIVE),
|
2015-06-02 18:26:27 +00:00
|
|
|
pause_nonactive,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2016-01-18 20:35:09 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
|
|
|
list, list_info,
|
|
|
|
&settings->ui.companion_enable,
|
|
|
|
menu_hash_to_str(MENU_LABEL_UI_COMPANION_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_UI_COMPANION_ENABLE),
|
|
|
|
ui_companion_enable,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
|
|
|
&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
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->ui.companion_start_on_boot,
|
2015-06-20 16:35:53 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_UI_COMPANION_START_ON_BOOT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_UI_COMPANION_START_ON_BOOT),
|
2015-11-16 04:52:55 +00:00
|
|
|
ui_companion_start_on_boot,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->ui.menubar_enable,
|
2015-06-20 16:35:53 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_UI_MENUBAR_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_UI_MENUBAR_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
true,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-06-22 01:07:32 +00:00
|
|
|
static bool setting_append_list_menu_file_browser_options(
|
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
|
|
|
{
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-06-25 18:06:11 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS),
|
|
|
|
parent_group);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-22 01:07:32 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->menu.navigation.browser.filter.supported_extensions_enable,
|
2015-06-22 01:07:32 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE),
|
|
|
|
true,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-22 01:07:32 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-10-18 05:05:15 +00:00
|
|
|
static bool setting_append_list_cheevos_options(
|
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
const char *parent_group)
|
|
|
|
{
|
|
|
|
#ifdef HAVE_CHEEVOS
|
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-10-18 05:09:49 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CHEEVOS_SETTINGS),
|
2015-10-18 05:05:15 +00:00
|
|
|
parent_group);
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
2015-10-18 05:05:15 +00:00
|
|
|
|
2015-10-18 17:21:57 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->cheevos.enable,
|
2015-10-18 17:21:57 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CHEEVOS_ENABLE),
|
2015-11-15 22:08:52 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ENABLE),
|
2015-10-18 17:21:57 +00:00
|
|
|
false,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-18 17:21:57 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-10-18 05:09:49 +00:00
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->cheevos.test_unofficial,
|
2015-10-18 05:09:49 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CHEEVOS_TEST_UNOFFICIAL),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CHEEVOS_TEST_UNOFFICIAL),
|
|
|
|
true,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-18 05:09:49 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2016-03-14 10:51:54 +00:00
|
|
|
CONFIG_BOOL(
|
|
|
|
list, list_info,
|
|
|
|
&settings->cheevos.hardcore_mode_enable,
|
|
|
|
menu_hash_to_str(MENU_LABEL_CHEEVOS_HARDCORE_MODE_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE),
|
|
|
|
false,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2016-03-14 11:53:56 +00:00
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_CHEEVOS_HARDCORE_MODE_TOGGLE);
|
2016-03-14 10:51:54 +00:00
|
|
|
|
2015-10-18 05:05:15 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
static bool setting_append_list_core_updater_options(
|
|
|
|
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
|
|
|
{
|
|
|
|
#ifdef HAVE_NETWORKING
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-06-25 18:06:11 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CORE_UPDATER_SETTINGS),
|
|
|
|
parent_group);
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_STRING(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->network.buildbot_url,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->network.buildbot_url),
|
2015-06-20 18:33:23 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CORE_UPDATER_BUILDBOT_URL),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CORE_UPDATER_BUILDBOT_URL),
|
2015-06-02 18:26:27 +00:00
|
|
|
buildbot_server_url,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
|
|
|
|
|
|
|
CONFIG_STRING(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->network.buildbot_assets_url,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->network.buildbot_assets_url),
|
2015-06-20 18:33:23 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_BUILDBOT_ASSETS_URL),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_BUILDBOT_ASSETS_URL),
|
2015-06-02 18:26:27 +00:00
|
|
|
buildbot_assets_server_url,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->network.buildbot_auto_extract_archive,
|
2015-06-20 18:33:23 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE),
|
2015-06-02 18:26:27 +00:00
|
|
|
true,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool setting_append_list_netplay_options(
|
|
|
|
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
|
|
|
{
|
2015-11-28 00:50:19 +00:00
|
|
|
#if defined(HAVE_NETWORK_CMD)
|
2015-11-27 23:36:22 +00:00
|
|
|
unsigned user;
|
2015-11-28 00:50:19 +00:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_NETPLAY
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
global_t *global = global_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-06-25 18:06:11 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NETWORK_SETTINGS),
|
|
|
|
parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Netplay", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2016-03-17 23:32:02 +00:00
|
|
|
&global->netplay.enable,
|
2015-06-20 18:15:31 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_NETPLAY_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NETPLAY_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
false,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->input.netplay_client_swap_input,
|
2015-06-20 18:15:31 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_NETPLAY_CLIENT_SWAP_INPUT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NETPLAY_CLIENT_SWAP_INPUT),
|
2015-06-02 18:26:27 +00:00
|
|
|
netplay_client_swap_input,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_STRING(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-07-27 15:18:10 +00:00
|
|
|
global->netplay.server,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(global->netplay.server),
|
2015-06-20 18:15:31 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_NETPLAY_IP_ADDRESS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NETPLAY_IP_ADDRESS),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&global->netplay.is_client,
|
2015-06-20 18:15:31 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_NETPLAY_MODE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NETPLAY_MODE),
|
2015-06-02 18:26:27 +00:00
|
|
|
false,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&global->netplay.is_spectate,
|
2015-06-20 18:15:31 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_NETPLAY_SPECTATOR_MODE_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NETPLAY_SPECTATOR_MODE_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
false,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&global->netplay.sync_frames,
|
2015-06-20 18:15:31 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_NETPLAY_DELAY_FRAMES),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NETPLAY_DELAY_FRAMES),
|
2015-06-02 18:26:27 +00:00
|
|
|
0,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 10, 1, true, false);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&global->netplay.port,
|
2015-06-20 18:15:31 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_NETPLAY_TCP_UDP_PORT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NETPLAY_TCP_UDP_PORT),
|
2015-06-02 18:26:27 +00:00
|
|
|
RARCH_DEFAULT_PORT,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 1, 99999, 1, true, true);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
START_SUB_GROUP(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
"Miscellaneous",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
#if defined(HAVE_NETWORK_CMD)
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->network_cmd_enable,
|
2015-06-20 15:47:09 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_NETWORK_CMD_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NETWORK_CMD_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
network_cmd_enable,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2015-11-27 05:11:52 +00:00
|
|
|
|
2015-06-03 16:07:29 +00:00
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->network_cmd_port,
|
2015-06-20 15:47:09 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_NETWORK_CMD_PORT),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NETWORK_CMD_PORT),
|
2015-06-02 18:26:27 +00:00
|
|
|
network_cmd_port,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-03 16:07:29 +00:00
|
|
|
NULL,
|
2015-06-02 18:26:27 +00:00
|
|
|
NULL);
|
2015-11-27 05:11:52 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 1, 99999, 1, true, true);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2015-11-27 05:11:52 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
|
|
|
list, list_info,
|
|
|
|
&settings->network_remote_enable,
|
|
|
|
menu_hash_to_str(MENU_LABEL_NETWORK_REMOTE_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NETWORK_REMOTE_ENABLE),
|
|
|
|
"", /* todo: add default */
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
|
|
|
list, list_info,
|
|
|
|
&settings->network_remote_base_port,
|
|
|
|
menu_hash_to_str(MENU_LABEL_NETWORK_REMOTE_PORT),
|
|
|
|
/* todo: localization */
|
|
|
|
"Network Remote Base Port",
|
|
|
|
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);
|
|
|
|
|
2015-11-27 23:36:22 +00:00
|
|
|
for(user = 0; user < settings->input.max_users; user++)
|
2015-11-27 05:11:52 +00:00
|
|
|
{
|
2015-11-27 23:36:22 +00:00
|
|
|
char s1[64], s2[64];
|
|
|
|
|
2015-11-27 18:37:56 +00:00
|
|
|
snprintf(s1, sizeof(s1), "%s_user_p%d", menu_hash_to_str(MENU_LABEL_NETWORK_REMOTE_ENABLE), user + 1);
|
|
|
|
snprintf(s2, sizeof(s2), "User %d Remote Enable", user + 1);
|
|
|
|
|
|
|
|
|
2015-11-27 05:11:52 +00:00
|
|
|
CONFIG_BOOL(
|
|
|
|
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 */
|
2015-11-27 18:37:56 +00:00
|
|
|
strdup(s1),
|
|
|
|
strdup(s2),
|
2015-11-27 05:11:52 +00:00
|
|
|
"", /* todo: add default */
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
|
|
|
&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
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->stdin_cmd_enable,
|
2015-06-20 15:47:09 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_STDIN_CMD_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_STDIN_CMD_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
stdin_cmd_enable,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
#endif
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool setting_append_list_playlist_options(
|
|
|
|
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
|
|
|
{
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-10-25 09:25:07 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_PLAYLIST_SETTINGS_BEGIN),
|
2015-06-25 18:06:11 +00:00
|
|
|
parent_group);
|
2015-06-15 03:03:14 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "History", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->history_list_enable,
|
2015-06-20 15:47:09 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_HISTORY_LIST_ENABLE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_HISTORY_LIST_ENABLE),
|
2015-06-02 18:26:27 +00:00
|
|
|
true,
|
2015-06-19 05:23:58 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->content_history_size,
|
2015-06-20 15:47:09 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CONTENT_HISTORY_SIZE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_CONTENT_HISTORY_SIZE),
|
2015-06-02 18:26:27 +00:00
|
|
|
default_content_history_size,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(list, list_info, 0, 0, 1.0, true, false);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-10-19 23:47:32 +00:00
|
|
|
static bool setting_append_list_accounts_options(
|
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
const char *parent_group)
|
|
|
|
{
|
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-10-19 23:47:32 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ACCOUNTS_LIST_END),
|
|
|
|
parent_group);
|
|
|
|
|
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
2015-10-19 23:47:32 +00:00
|
|
|
|
|
|
|
(void)subgroup_info;
|
|
|
|
|
|
|
|
#ifdef HAVE_CHEEVOS
|
|
|
|
CONFIG_ACTION(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-10-19 23:47:32 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_ACCOUNTS_RETRO_ACHIEVEMENTS),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ACCOUNTS_RETRO_ACHIEVEMENTS),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-19 23:47:32 +00:00
|
|
|
parent_group);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-10-19 23:35:08 +00:00
|
|
|
#ifdef HAVE_CHEEVOS
|
|
|
|
static bool setting_append_list_accounts_cheevos_options(
|
2015-10-18 20:08:17 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
const char *parent_group)
|
|
|
|
{
|
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-10-19 23:35:08 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ACCOUNTS_CHEEVOS_SETTINGS),
|
2015-10-18 20:08:17 +00:00
|
|
|
parent_group);
|
|
|
|
|
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
2015-10-18 20:08:17 +00:00
|
|
|
|
|
|
|
CONFIG_STRING(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-10-18 20:08:17 +00:00
|
|
|
settings->cheevos.username,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->cheevos.username),
|
2015-10-18 20:08:17 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CHEEVOS_USERNAME),
|
2015-11-15 22:08:52 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ACCOUNTS_CHEEVOS_USERNAME),
|
2015-10-18 20:08:17 +00:00
|
|
|
"",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-18 20:08:17 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
|
|
|
|
|
|
|
CONFIG_STRING(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-10-18 23:46:33 +00:00
|
|
|
settings->cheevos.password,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->cheevos.password),
|
2015-10-19 23:35:08 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CHEEVOS_PASSWORD),
|
2015-11-15 22:08:52 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ACCOUNTS_CHEEVOS_PASSWORD),
|
2015-10-18 20:08:17 +00:00
|
|
|
"",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-18 20:08:17 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
|
|
|
|
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
2015-10-19 23:35:08 +00:00
|
|
|
#endif
|
2015-10-18 20:08:17 +00:00
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
static bool setting_append_list_user_options(
|
|
|
|
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
|
|
|
{
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-06-25 18:06:11 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_USER_SETTINGS),
|
|
|
|
parent_group);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-10-17 13:28:16 +00:00
|
|
|
CONFIG_ACTION(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-10-17 13:28:16 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_ACCOUNTS_LIST),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ACCOUNTS_LIST),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-10-17 13:28:16 +00:00
|
|
|
parent_group);
|
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
CONFIG_STRING(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->username,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->username),
|
2015-06-19 23:19:07 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_NETPLAY_NICKNAME),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_NETPLAY_NICKNAME),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
|
|
|
&settings->user_language,
|
2015-06-19 23:19:07 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_USER_LANGUAGE),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_USER_LANGUAGE),
|
2015-06-02 18:26:27 +00:00
|
|
|
def_user_language,
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_range(
|
2015-06-02 18:26:27 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
0,
|
|
|
|
RETRO_LANGUAGE_LAST-1,
|
|
|
|
1,
|
|
|
|
true,
|
|
|
|
true);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
2015-12-12 16:25:03 +00:00
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_MENU_REFRESH);
|
2015-06-02 18:26:27 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation =
|
|
|
|
&setting_get_string_representation_uint_user_language;
|
|
|
|
|
2015-06-07 23:40:25 +00:00
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool setting_append_list_directory_options(
|
|
|
|
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
|
|
|
{
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
global_t *global = global_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-06-25 18:06:11 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_DIRECTORY_SETTINGS),
|
|
|
|
parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-07-12 19:17:42 +00:00
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-07-12 19:17:42 +00:00
|
|
|
settings->system_directory,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->system_directory),
|
2015-07-12 19:17:42 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_SYSTEM_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SYSTEM_DIRECTORY),
|
|
|
|
"",
|
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_CONTENT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-07-12 19:17:42 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->core_assets_directory,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->core_assets_directory),
|
2015-06-20 21:03:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CORE_ASSETS_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CORE_ASSETS_DIRECTORY),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_DEFAULT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->assets_directory,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->assets_directory),
|
2015-06-20 21:03:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_ASSETS_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_ASSETS_DIRECTORY),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_DEFAULT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2015-06-04 10:17:23 +00:00
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-04 10:17:23 +00:00
|
|
|
settings->dynamic_wallpapers_directory,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->dynamic_wallpapers_directory),
|
2015-06-20 21:03:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_DYNAMIC_WALLPAPERS_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY),
|
2015-06-04 10:17:23 +00:00
|
|
|
"",
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_DEFAULT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-04 10:17:23 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-18 02:32:56 +00:00
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-18 02:32:56 +00:00
|
|
|
settings->boxarts_directory,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->boxarts_directory),
|
2015-06-20 21:03:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_BOXARTS_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_BOXARTS_DIRECTORY),
|
2015-06-18 02:32:56 +00:00
|
|
|
"",
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_DEFAULT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-18 02:32:56 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->menu_content_directory,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->menu_content_directory),
|
2015-06-20 21:03:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RGUI_BROWSER_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RGUI_BROWSER_DIRECTORY),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_DEFAULT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->menu_config_directory,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->menu_config_directory),
|
2015-06-20 21:03:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RGUI_CONFIG_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RGUI_CONFIG_DIRECTORY),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_DEFAULT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->libretro_directory,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->libretro_directory),
|
2015-06-20 21:03:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_LIBRETRO_DIR_PATH),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_LIBRETRO_DIR_PATH),
|
2015-07-27 15:18:10 +00:00
|
|
|
g_defaults.dir.core,
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_NONE),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_CORE_INFO_INIT);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->libretro_info_path,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->libretro_info_path),
|
2015-06-20 21:03:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_LIBRETRO_INFO_PATH),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_LIBRETRO_INFO_PATH),
|
2015-07-27 15:18:10 +00:00
|
|
|
g_defaults.dir.core_info,
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_NONE),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-06-03 19:27:47 +00:00
|
|
|
menu_settings_list_current_add_cmd(list, list_info, EVENT_CMD_CORE_INFO_INIT);
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
|
|
|
#ifdef HAVE_LIBRETRODB
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->content_database,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->content_database),
|
2015-06-20 21:03:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CONTENT_DATABASE_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CONTENT_DATABASE_DIRECTORY),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_NONE),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->cursor_directory,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->cursor_directory),
|
2015-06-20 21:03:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CURSOR_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CURSOR_DIRECTORY),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_NONE),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->cheat_database,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->cheat_database),
|
2015-06-20 21:03:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CHEAT_DATABASE_PATH),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CHEAT_DATABASE_PATH),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_NONE),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->video.filter_dir,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->video.filter_dir),
|
2015-06-20 21:03:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_FILTER_DIR),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_FILTER_DIR),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_DEFAULT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->audio.filter_dir,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->audio.filter_dir),
|
2015-06-20 21:03:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_AUDIO_FILTER_DIR),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_AUDIO_FILTER_DIR),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_DEFAULT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->video.shader_dir,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->video.shader_dir),
|
2015-06-20 21:03:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VIDEO_SHADER_DIR),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_SHADER_DIR),
|
2015-07-27 15:18:10 +00:00
|
|
|
g_defaults.dir.shader,
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_DEFAULT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
2016-01-20 03:54:17 +00:00
|
|
|
if (!string_is_equal(settings->record.driver, "null"))
|
2015-07-05 19:12:52 +00:00
|
|
|
{
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-07-05 19:12:52 +00:00
|
|
|
global->record.output_dir,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(global->record.output_dir),
|
2015-07-05 19:12:52 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RECORDING_OUTPUT_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY),
|
|
|
|
"",
|
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_DEFAULT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-07-05 19:12:52 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-07-05 19:12:52 +00:00
|
|
|
global->record.config_dir,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(global->record.config_dir),
|
2015-07-05 19:12:52 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_RECORDING_CONFIG_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY),
|
|
|
|
"",
|
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_DEFAULT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-07-05 19:12:52 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
#ifdef HAVE_OVERLAY
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-09-26 17:21:32 +00:00
|
|
|
settings->overlay_directory,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->overlay_directory),
|
2015-06-20 21:03:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_OVERLAY_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_OVERLAY_DIRECTORY),
|
2015-07-27 15:18:10 +00:00
|
|
|
g_defaults.dir.overlay,
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_DEFAULT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-07-27 15:18:10 +00:00
|
|
|
global->dir.osk_overlay,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(global->dir.osk_overlay),
|
2015-06-20 21:03:45 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_OSK_OVERLAY_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_OSK_OVERLAY_DIRECTORY),
|
2015-07-27 15:18:10 +00:00
|
|
|
g_defaults.dir.osk_overlay,
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_DEFAULT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->screenshot_directory,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->screenshot_directory),
|
2015-06-21 01:04:42 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_SCREENSHOT_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SCREENSHOT_DIRECTORY),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-06-21 02:15:36 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_CONTENT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->input.autoconfig_dir,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->input.autoconfig_dir),
|
2015-06-21 01:04:42 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_JOYPAD_AUTOCONFIG_DIR),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_JOYPAD_AUTOCONFIG_DIR),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_DEFAULT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->input_remapping_directory,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->input_remapping_directory),
|
2015-06-21 01:04:42 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_INPUT_REMAPPING_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_NONE),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-06-02 18:26:27 +00:00
|
|
|
settings->playlist_directory,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->playlist_directory),
|
2015-06-21 01:04:42 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_PLAYLIST_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_PLAYLIST_DIRECTORY),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_DEFAULT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-07-27 15:18:10 +00:00
|
|
|
global->dir.savefile,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(global->dir.savefile),
|
2015-06-21 01:04:42 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_SAVEFILE_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SAVEFILE_DIRECTORY),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-06-21 02:15:36 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_CONTENT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-07-27 15:18:10 +00:00
|
|
|
global->dir.savestate,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(global->dir.savestate),
|
2015-06-21 01:04:42 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_SAVESTATE_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_SAVESTATE_DIRECTORY),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-06-21 02:15:36 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_CONTENT),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-10-26 23:48:35 +00:00
|
|
|
settings->cache_directory,
|
2015-11-21 15:32:22 +00:00
|
|
|
sizeof(settings->cache_directory),
|
2015-10-26 23:44:20 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CACHE_DIRECTORY),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CACHE_DIRECTORY),
|
2015-06-02 18:26:27 +00:00
|
|
|
"",
|
2015-06-21 01:32:57 +00:00
|
|
|
menu_hash_to_str(MENU_VALUE_DIRECTORY_NONE),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-07 23:40:25 +00:00
|
|
|
parent_group,
|
2015-06-02 18:26:27 +00:00
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2015-06-07 23:40:25 +00:00
|
|
|
|
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool setting_append_list_privacy_options(
|
|
|
|
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
|
|
|
{
|
2015-06-06 08:35:14 +00:00
|
|
|
rarch_setting_group_info_t group_info = {0};
|
|
|
|
rarch_setting_group_info_t subgroup_info = {0};
|
2015-06-02 18:26:27 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-11-21 15:32:22 +00:00
|
|
|
START_GROUP(list, list_info, &group_info,
|
2015-06-22 00:02:48 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_PRIVACY_SETTINGS), parent_group);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-06-18 23:20:41 +00:00
|
|
|
parent_group = menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS);
|
2015-06-08 00:03:50 +00:00
|
|
|
|
2015-06-06 08:35:14 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State",
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info, &subgroup_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-01-20 03:54:17 +00:00
|
|
|
if (!string_is_equal(settings->camera.driver, "null"))
|
2015-06-21 07:12:16 +00:00
|
|
|
{
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->camera.allow,
|
2015-06-21 07:12:16 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_CAMERA_ALLOW),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_CAMERA_ALLOW),
|
|
|
|
false,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-21 07:12:16 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-01-20 03:54:17 +00:00
|
|
|
if (!string_is_equal(settings->location.driver, "null"))
|
2015-06-21 07:12:16 +00:00
|
|
|
{
|
|
|
|
CONFIG_BOOL(
|
2015-11-21 15:32:22 +00:00
|
|
|
list, list_info,
|
2015-11-18 02:08:19 +00:00
|
|
|
&settings->location.allow,
|
2015-06-21 07:12:16 +00:00
|
|
|
menu_hash_to_str(MENU_LABEL_LOCATION_ALLOW),
|
|
|
|
menu_hash_to_str(MENU_LABEL_VALUE_LOCATION_ALLOW),
|
|
|
|
false,
|
|
|
|
menu_hash_to_str(MENU_VALUE_OFF),
|
|
|
|
menu_hash_to_str(MENU_VALUE_ON),
|
2015-11-21 15:32:22 +00:00
|
|
|
&group_info,
|
|
|
|
&subgroup_info,
|
2015-06-21 07:12:16 +00:00
|
|
|
parent_group,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
}
|
2015-06-07 23:40:25 +00:00
|
|
|
|
|
|
|
END_SUB_GROUP(list, list_info, parent_group);
|
|
|
|
END_GROUP(list, list_info, parent_group);
|
2015-06-02 18:26:27 +00:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2016-03-18 21:27:40 +00:00
|
|
|
static bool menu_setting_free(void *data)
|
2015-06-12 15:55:11 +00:00
|
|
|
{
|
2016-03-18 21:27:40 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-06-26 16:35:35 +00:00
|
|
|
|
2016-03-18 21:27:40 +00:00
|
|
|
if (!data)
|
|
|
|
return false;
|
2015-06-12 19:03:43 +00:00
|
|
|
|
2015-10-11 12:46:47 +00:00
|
|
|
for (; menu_setting_get_type(setting) != ST_NONE; menu_settings_list_increment(&setting))
|
2015-06-12 19:03:43 +00:00
|
|
|
{
|
2015-10-11 21:07:43 +00:00
|
|
|
enum setting_type setting_type = menu_setting_get_type(setting);
|
2015-06-12 19:23:17 +00:00
|
|
|
|
2015-10-11 21:07:43 +00:00
|
|
|
switch (setting_type)
|
2015-06-12 19:23:17 +00:00
|
|
|
{
|
2015-10-11 21:07:43 +00:00
|
|
|
case ST_STRING_OPTIONS:
|
|
|
|
if (setting->values)
|
|
|
|
free((void*)setting->values);
|
|
|
|
setting->values = NULL;
|
|
|
|
break;
|
|
|
|
case ST_BIND:
|
|
|
|
free((void*)setting->name);
|
|
|
|
free((void*)setting->short_description);
|
|
|
|
setting->name = NULL;
|
|
|
|
setting->short_description = NULL;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
2015-06-12 19:23:17 +00:00
|
|
|
}
|
2015-06-12 19:03:43 +00:00
|
|
|
}
|
|
|
|
|
2016-03-18 21:27:40 +00:00
|
|
|
free(data);
|
|
|
|
|
|
|
|
return true;
|
2015-06-12 15:55:11 +00:00
|
|
|
}
|
|
|
|
|
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
|
|
|
{
|
|
|
|
rarch_setting_t* resized_list = NULL;
|
2016-03-20 18:29:59 +00:00
|
|
|
rarch_setting_t terminator = { ST_NONE };
|
2015-06-15 04:25:41 +00:00
|
|
|
const char *root = menu_hash_to_str(MENU_VALUE_MAIN_MENU);
|
2016-03-20 18:29:59 +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 18:54:16 +00:00
|
|
|
if (!setting_append_list(SETTINGS_LIST_MAIN_MENU, &list, list_info, root))
|
2015-10-19 01:28:00 +00:00
|
|
|
goto error;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-03-20 18:54:16 +00:00
|
|
|
if (!setting_append_list(SETTINGS_LIST_DRIVERS, &list, list_info, root))
|
2015-10-19 01:28:00 +00:00
|
|
|
goto error;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2016-03-20 18:54:16 +00:00
|
|
|
if (!setting_append_list(SETTINGS_LIST_CORE, &list, list_info, root))
|
2015-10-19 01:28:00 +00:00
|
|
|
goto error;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_configuration_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_logging_options(&list, list_info, root))
|
|
|
|
goto error;
|
2016-03-20 18:29:59 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_saving_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_rewind_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-24 04:58:01 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_video_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_audio_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-10-23 05:05:57 +00:00
|
|
|
if (!setting_append_list_input_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-04 15:41:07 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_input_hotkey_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-07-05 19:12:52 +00:00
|
|
|
|
2015-06-02 18:26:27 +00:00
|
|
|
{
|
2015-06-21 07:10:23 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2016-01-20 03:54:17 +00:00
|
|
|
if (!string_is_equal(settings->record.driver, "null"))
|
2015-06-21 07:10:23 +00:00
|
|
|
{
|
|
|
|
if (!setting_append_list_recording_options(&list, list_info, root))
|
|
|
|
goto error;
|
|
|
|
}
|
2015-06-02 18:26:27 +00:00
|
|
|
}
|
2015-07-05 19:12:52 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_frame_throttling_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-04 15:20:47 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_font_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_overlay_options(&list, list_info, root))
|
|
|
|
goto error;
|
2016-03-20 18:29:59 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_menu_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_menu_file_browser_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-22 01:07:32 +00:00
|
|
|
|
2015-06-28 16:55:00 +00:00
|
|
|
#if defined(HAVE_IMAGEVIEWER) || defined(HAVE_FFMPEG)
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_multimedia_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-28 16:55:00 +00:00
|
|
|
#endif
|
2015-06-23 05:09:24 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_ui_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_playlist_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-10-18 05:05:15 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_cheevos_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_core_updater_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_netplay_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_user_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-10-19 23:47:32 +00:00
|
|
|
if (!setting_append_list_accounts_options(&list, list_info, root))
|
|
|
|
goto error;
|
|
|
|
|
2015-10-19 23:35:08 +00:00
|
|
|
#ifdef HAVE_CHEEVOS
|
|
|
|
if (!setting_append_list_accounts_cheevos_options(&list, list_info, root))
|
2015-10-19 01:28:00 +00:00
|
|
|
goto error;
|
2015-10-19 23:35:08 +00:00
|
|
|
#endif
|
2015-10-18 20:08:17 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_directory_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-10-19 01:28:00 +00:00
|
|
|
if (!setting_append_list_privacy_options(&list, list_info, root))
|
|
|
|
goto error;
|
2015-06-02 18:26:27 +00:00
|
|
|
|
2015-06-03 19:27:47 +00:00
|
|
|
if (!(menu_settings_list_append(&list, list_info, terminator)))
|
2015-06-02 18:26:27 +00:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* 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 = menu_setting_get_flags(setting);
|
|
|
|
|
|
|
|
if (menu_setting_get_type(setting) != ST_ACTION)
|
|
|
|
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;
|
2016-03-18 21:27:40 +00:00
|
|
|
case MENU_SETTING_CTL_FREE:
|
|
|
|
return menu_setting_free(data);
|
2016-03-18 21:31:14 +00:00
|
|
|
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;
|
|
|
|
}
|