2013-11-22 14:30:02 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2014-01-01 00:50:59 +00:00
|
|
|
* Copyright (C) 2013-2014 - Jason Fetters
|
2015-01-07 17:24:13 +00:00
|
|
|
* Copyright (C) 2011-2015 - Daniel De Matteis
|
|
|
|
* Copyright (C) 2014-2015 - Jay McCarthy
|
2013-11-22 14:30:02 +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/>.
|
|
|
|
*/
|
|
|
|
|
2014-11-11 17:21:50 +00:00
|
|
|
#include "driver.h"
|
2015-01-18 18:04:27 +00:00
|
|
|
#include "gfx/video_monitor.h"
|
2015-03-20 23:49:55 +00:00
|
|
|
#include "settings.h"
|
2014-10-22 02:27:51 +00:00
|
|
|
#include "dynamic.h"
|
2014-10-21 22:23:06 +00:00
|
|
|
#include <file/file_path.h>
|
2014-10-25 23:53:13 +00:00
|
|
|
#include "input/input_autodetect.h"
|
2014-05-03 16:38:29 +00:00
|
|
|
#include "config.def.h"
|
2015-01-07 14:49:56 +00:00
|
|
|
#include "file_ext.h"
|
2015-01-09 16:40:47 +00:00
|
|
|
#include "retroarch.h"
|
2015-01-18 19:03:33 +00:00
|
|
|
#include "performance.h"
|
2014-05-03 16:38:29 +00:00
|
|
|
|
2014-08-31 02:03:04 +00:00
|
|
|
#if defined(__CELLOS_LV2__)
|
|
|
|
#include <sdk_version.h>
|
|
|
|
|
|
|
|
#if (CELL_SDK_VERSION > 0x340000)
|
|
|
|
#include <sysutil/sysutil_bgmplayback.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2014-09-01 00:17:59 +00:00
|
|
|
#ifdef HAVE_MENU
|
2014-10-28 18:54:23 +00:00
|
|
|
#include "menu/menu_entries.h"
|
2014-09-01 00:17:59 +00:00
|
|
|
#endif
|
|
|
|
|
2015-01-08 23:07:42 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_reset_setting:
|
2015-01-08 23:07:42 +00:00
|
|
|
* @setting : pointer to setting
|
|
|
|
*
|
|
|
|
* Reset a setting's value to its defaults.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
void setting_reset_setting(rarch_setting_t* setting)
|
2013-12-26 21:17:37 +00:00
|
|
|
{
|
2014-09-12 02:12:23 +00:00
|
|
|
if (!setting)
|
|
|
|
return;
|
|
|
|
|
2013-12-26 21:17:37 +00:00
|
|
|
switch (setting->type)
|
|
|
|
{
|
2014-04-26 01:14:53 +00:00
|
|
|
case ST_BOOL:
|
|
|
|
*setting->value.boolean = setting->default_value.boolean;
|
|
|
|
break;
|
|
|
|
case ST_INT:
|
|
|
|
*setting->value.integer = setting->default_value.integer;
|
|
|
|
break;
|
|
|
|
case ST_UINT:
|
|
|
|
*setting->value.unsigned_integer = setting->default_value.unsigned_integer;
|
|
|
|
break;
|
|
|
|
case ST_FLOAT:
|
|
|
|
*setting->value.fraction = setting->default_value.fraction;
|
|
|
|
break;
|
|
|
|
case ST_BIND:
|
|
|
|
*setting->value.keybind = *setting->default_value.keybind;
|
|
|
|
break;
|
2013-12-26 21:17:37 +00:00
|
|
|
case ST_STRING:
|
|
|
|
case ST_PATH:
|
2014-08-09 02:27:05 +00:00
|
|
|
case ST_DIR:
|
2014-05-03 16:38:29 +00:00
|
|
|
if (setting->default_value.string)
|
|
|
|
{
|
|
|
|
if (setting->type == ST_STRING)
|
2014-08-17 14:42:48 +00:00
|
|
|
strlcpy(setting->value.string, setting->default_value.string,
|
|
|
|
setting->size);
|
2014-05-03 16:38:29 +00:00
|
|
|
else
|
2014-08-17 14:42:48 +00:00
|
|
|
fill_pathname_expand_special(setting->value.string,
|
|
|
|
setting->default_value.string, setting->size);
|
2013-12-26 21:17:37 +00:00
|
|
|
}
|
2014-05-03 16:38:29 +00:00
|
|
|
break;
|
2014-08-17 14:33:57 +00:00
|
|
|
/* TODO */
|
2014-10-22 22:10:58 +00:00
|
|
|
case ST_ACTION:
|
|
|
|
break;
|
2014-08-17 14:33:57 +00:00
|
|
|
case ST_HEX:
|
|
|
|
break;
|
|
|
|
case ST_GROUP:
|
|
|
|
break;
|
|
|
|
case ST_SUB_GROUP:
|
|
|
|
break;
|
|
|
|
case ST_END_GROUP:
|
|
|
|
break;
|
|
|
|
case ST_END_SUB_GROUP:
|
|
|
|
break;
|
|
|
|
case ST_NONE:
|
2013-12-26 21:17:37 +00:00
|
|
|
break;
|
|
|
|
}
|
2014-05-03 16:38:29 +00:00
|
|
|
|
2014-01-06 01:12:04 +00:00
|
|
|
if (setting->change_handler)
|
|
|
|
setting->change_handler(setting);
|
2013-12-26 21:17:37 +00:00
|
|
|
}
|
|
|
|
|
2015-01-08 23:07:42 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_reset:
|
2015-01-08 23:07:42 +00:00
|
|
|
* @settings : pointer to settings
|
|
|
|
*
|
|
|
|
* Reset all settings to their default values.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
void setting_reset(rarch_setting_t* settings)
|
2013-11-22 14:30:02 +00:00
|
|
|
{
|
2014-08-17 12:44:23 +00:00
|
|
|
for (; settings->type != ST_NONE; settings++)
|
2015-03-20 23:56:26 +00:00
|
|
|
setting_reset_setting(settings);
|
2013-11-22 14:30:02 +00:00
|
|
|
}
|
|
|
|
|
2015-01-08 23:07:42 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_reset:
|
2015-01-08 23:07:42 +00:00
|
|
|
* @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.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
rarch_setting_t* setting_find_setting(rarch_setting_t* settings,
|
2014-08-17 14:42:48 +00:00
|
|
|
const char* name)
|
2013-11-22 14:30:02 +00:00
|
|
|
{
|
2014-08-09 01:25:11 +00:00
|
|
|
bool found = false;
|
2014-07-08 17:23:53 +00:00
|
|
|
|
2015-01-08 23:07:42 +00:00
|
|
|
if (!settings || !name)
|
2014-08-09 01:25:11 +00:00
|
|
|
return NULL;
|
2013-11-22 14:30:02 +00:00
|
|
|
|
2015-01-08 23:07:42 +00:00
|
|
|
for (; settings->type != ST_NONE; settings++)
|
2014-08-08 19:50:22 +00:00
|
|
|
{
|
2015-01-08 23:07:42 +00:00
|
|
|
if (settings->type <= ST_GROUP && !strcmp(settings->name, name))
|
2014-08-08 19:50:22 +00:00
|
|
|
{
|
2014-08-09 01:25:11 +00:00
|
|
|
found = true;
|
2014-07-24 18:28:38 +00:00
|
|
|
break;
|
2014-08-08 19:50:22 +00:00
|
|
|
}
|
|
|
|
}
|
2013-11-22 14:30:02 +00:00
|
|
|
|
2014-08-25 13:53:17 +00:00
|
|
|
if (!found)
|
|
|
|
return NULL;
|
|
|
|
|
2015-01-08 23:07:42 +00:00
|
|
|
if (settings->short_description && settings->short_description[0] == '\0')
|
2014-08-25 13:53:17 +00:00
|
|
|
return NULL;
|
2014-08-09 01:25:11 +00:00
|
|
|
|
2015-01-08 23:07:42 +00:00
|
|
|
if (settings->read_handler)
|
|
|
|
settings->read_handler(settings);
|
2014-08-08 19:50:22 +00:00
|
|
|
|
2015-01-08 23:07:42 +00:00
|
|
|
return settings;
|
2013-11-22 14:30:02 +00:00
|
|
|
}
|
|
|
|
|
2015-01-08 23:07:42 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_set_with_string_representation:
|
2015-01-08 23:07:42 +00:00
|
|
|
* @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.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
void setting_set_with_string_representation(rarch_setting_t* setting,
|
2014-08-17 14:42:48 +00:00
|
|
|
const char* value)
|
2013-11-22 14:30:02 +00:00
|
|
|
{
|
|
|
|
if (!setting || !value)
|
|
|
|
return;
|
2014-05-03 16:38:29 +00:00
|
|
|
|
2013-11-22 14:30:02 +00:00
|
|
|
switch (setting->type)
|
|
|
|
{
|
2013-12-29 21:00:21 +00:00
|
|
|
case ST_INT:
|
|
|
|
sscanf(value, "%d", setting->value.integer);
|
2014-08-03 00:58:42 +00:00
|
|
|
if (setting->flags & SD_FLAG_HAS_RANGE)
|
|
|
|
{
|
|
|
|
if (*setting->value.integer < setting->min)
|
|
|
|
*setting->value.integer = setting->min;
|
|
|
|
if (*setting->value.integer > setting->max)
|
|
|
|
*setting->value.integer = setting->max;
|
|
|
|
}
|
2013-12-29 21:00:21 +00:00
|
|
|
break;
|
|
|
|
case ST_UINT:
|
|
|
|
sscanf(value, "%u", setting->value.unsigned_integer);
|
2014-08-03 00:58:42 +00:00
|
|
|
if (setting->flags & SD_FLAG_HAS_RANGE)
|
|
|
|
{
|
|
|
|
if (*setting->value.unsigned_integer < setting->min)
|
|
|
|
*setting->value.unsigned_integer = setting->min;
|
|
|
|
if (*setting->value.unsigned_integer > setting->max)
|
|
|
|
*setting->value.unsigned_integer = setting->max;
|
|
|
|
}
|
2013-12-29 21:00:21 +00:00
|
|
|
break;
|
|
|
|
case ST_FLOAT:
|
|
|
|
sscanf(value, "%f", setting->value.fraction);
|
2014-08-03 00:58:42 +00:00
|
|
|
if (setting->flags & SD_FLAG_HAS_RANGE)
|
|
|
|
{
|
|
|
|
if (*setting->value.fraction < setting->min)
|
|
|
|
*setting->value.fraction = setting->min;
|
|
|
|
if (*setting->value.fraction > setting->max)
|
|
|
|
*setting->value.fraction = setting->max;
|
|
|
|
}
|
2013-12-29 21:00:21 +00:00
|
|
|
break;
|
2014-04-26 01:14:53 +00:00
|
|
|
case ST_PATH:
|
2014-08-09 02:27:05 +00:00
|
|
|
case ST_DIR:
|
2014-04-26 01:14:53 +00:00
|
|
|
case ST_STRING:
|
2015-01-07 02:53:18 +00:00
|
|
|
case ST_ACTION:
|
2014-04-26 01:14:53 +00:00
|
|
|
strlcpy(setting->value.string, value, setting->size);
|
|
|
|
break;
|
2013-12-29 21:00:21 +00:00
|
|
|
|
2014-08-17 14:33:57 +00:00
|
|
|
/* TODO */
|
|
|
|
case ST_HEX:
|
|
|
|
break;
|
|
|
|
case ST_GROUP:
|
|
|
|
break;
|
|
|
|
case ST_SUB_GROUP:
|
|
|
|
break;
|
|
|
|
case ST_END_GROUP:
|
|
|
|
break;
|
|
|
|
case ST_END_SUB_GROUP:
|
|
|
|
break;
|
|
|
|
case ST_NONE:
|
|
|
|
break;
|
|
|
|
case ST_BOOL:
|
|
|
|
break;
|
|
|
|
case ST_BIND:
|
|
|
|
break;
|
2013-11-22 14:30:02 +00:00
|
|
|
}
|
2014-05-03 16:38:29 +00:00
|
|
|
|
2014-01-06 01:12:04 +00:00
|
|
|
if (setting->change_handler)
|
|
|
|
setting->change_handler(setting);
|
2013-11-22 14:30:02 +00:00
|
|
|
}
|
|
|
|
|
2015-01-08 23:07:42 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_get_string_representation:
|
2015-01-08 23:07:42 +00:00
|
|
|
* @setting : pointer to setting
|
2015-02-01 12:39:07 +00:00
|
|
|
* @type_str : buffer to write contents of string representation to.
|
|
|
|
* @sizeof_type_str : size of the buffer (@type_str)
|
2015-01-08 23:07:42 +00:00
|
|
|
*
|
|
|
|
* Get a setting value's string representation.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
void setting_get_string_representation(void *data,
|
2015-02-01 12:39:07 +00:00
|
|
|
char *type_str, size_t sizeof_type_str)
|
2013-11-22 14:30:02 +00:00
|
|
|
{
|
2015-01-30 09:35:06 +00:00
|
|
|
rarch_setting_t* setting = (rarch_setting_t*)data;
|
2015-02-01 12:39:07 +00:00
|
|
|
if (!setting || !type_str || !sizeof_type_str)
|
2014-08-17 14:20:37 +00:00
|
|
|
return;
|
2013-11-22 14:30:02 +00:00
|
|
|
|
2015-02-01 12:39:07 +00:00
|
|
|
if (setting->get_string_representation)
|
|
|
|
setting->get_string_representation(setting, type_str, sizeof_type_str);
|
2013-11-22 14:30:02 +00:00
|
|
|
}
|
|
|
|
|
2015-01-09 15:22:56 +00:00
|
|
|
/**
|
|
|
|
******* ACTION START CALLBACK FUNCTIONS *******
|
|
|
|
**/
|
|
|
|
|
2015-01-08 23:07:42 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_action_start_savestates:
|
2015-01-08 23:07:42 +00:00
|
|
|
* @data : pointer to setting
|
|
|
|
*
|
|
|
|
* Function callback for 'Savestate' action's 'Action Start'
|
|
|
|
* function pointer.
|
|
|
|
*
|
|
|
|
* Returns: 0 on success, -1 on error.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_action_start_savestates(void *data)
|
2014-10-16 00:53:35 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-03-20 18:57:16 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2014-10-16 00:53:35 +00:00
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->state_slot = 0;
|
2014-10-16 00:53:35 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_action_start_bind_device(void *data)
|
2015-01-08 23:41:03 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-03-20 18:57:16 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-01-08 23:41:03 +00:00
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->input.joypad_map[setting->index_offset] = setting->index_offset;
|
2015-01-08 23:41:03 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_bool_action_start_default(void *data)
|
2015-01-08 23:41:03 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
*setting->value.boolean = setting->default_value.boolean;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_string_dir_action_start_default(void *data)
|
2015-01-08 23:41:03 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
*setting->value.string = '\0';
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_action_start_analog_dpad_mode(void *data)
|
2015-01-08 23:41:03 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
*setting->value.unsigned_integer = 0;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_uint_action_start_default(void *data)
|
2015-01-08 23:41:03 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
*setting->value.unsigned_integer = setting->default_value.unsigned_integer;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_action_start_libretro_device_type(void *data)
|
2015-01-08 23:41:03 +00:00
|
|
|
{
|
2015-01-08 23:56:11 +00:00
|
|
|
unsigned current_device, i, devices[128], types = 0, port = 0;
|
|
|
|
const struct retro_controller_info *desc = NULL;
|
2015-03-21 03:43:18 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-03-20 18:57:16 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-03-21 03:43:18 +00:00
|
|
|
global_t *global = global_get_ptr();
|
2015-01-08 23:41:03 +00:00
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
*setting->value.unsigned_integer = setting->default_value.unsigned_integer;
|
|
|
|
|
|
|
|
port = setting->index_offset;
|
|
|
|
|
|
|
|
devices[types++] = RETRO_DEVICE_NONE;
|
|
|
|
devices[types++] = RETRO_DEVICE_JOYPAD;
|
|
|
|
|
|
|
|
/* Only push RETRO_DEVICE_ANALOG as default if we use an
|
|
|
|
* older core which doesn't use SET_CONTROLLER_INFO. */
|
2015-03-21 03:43:18 +00:00
|
|
|
if (!global->system.num_ports)
|
2015-01-08 23:41:03 +00:00
|
|
|
devices[types++] = RETRO_DEVICE_ANALOG;
|
|
|
|
|
2015-03-21 03:43:18 +00:00
|
|
|
desc = port < global->system.num_ports ?
|
|
|
|
&global->system.ports[port] : NULL;
|
|
|
|
|
2015-01-08 23:41:03 +00:00
|
|
|
if (desc)
|
|
|
|
{
|
|
|
|
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-03-20 18:57:16 +00:00
|
|
|
current_device = settings->input.libretro_device[port];
|
2015-01-08 23:41:03 +00:00
|
|
|
|
|
|
|
current_device = RETRO_DEVICE_JOYPAD;
|
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->input.libretro_device[port] = current_device;
|
2015-01-08 23:41:03 +00:00
|
|
|
pretro_set_controller_port_device(port, current_device);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_action_start_video_refresh_rate_auto(
|
2015-01-08 23:41:03 +00:00
|
|
|
void *data)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-03-18 05:47:22 +00:00
|
|
|
runloop_t *runloop = rarch_main_get_ptr();
|
2015-01-08 23:41:03 +00:00
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
2015-03-18 05:47:22 +00:00
|
|
|
runloop->measure_data.frame_time_samples_count = 0;
|
2015-01-08 23:41:03 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_fraction_action_start_default(
|
2015-01-08 23:41:03 +00:00
|
|
|
void *data)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
*setting->value.fraction = setting->default_value.fraction;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_uint_action_start_linefeed(void *data)
|
2015-01-08 23:41:03 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
*setting->value.unsigned_integer = setting->default_value.unsigned_integer;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_string_action_start_allow_input(void *data)
|
2015-01-08 23:41:03 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
2015-02-13 22:41:34 +00:00
|
|
|
if (!setting)
|
2015-01-08 23:41:03 +00:00
|
|
|
return -1;
|
|
|
|
|
|
|
|
*setting->value.string = '\0';
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_bind_action_start(void *data)
|
2015-01-08 23:41:03 +00:00
|
|
|
{
|
2015-03-21 03:43:18 +00:00
|
|
|
struct retro_keybind *keybind = NULL;
|
2015-01-08 23:41:03 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-01-08 23:56:11 +00:00
|
|
|
struct retro_keybind *def_binds = (struct retro_keybind *)retro_keybinds_1;
|
2015-03-21 03:43:18 +00:00
|
|
|
global_t *global = global_get_ptr();
|
2015-01-08 23:41:03 +00:00
|
|
|
|
2015-02-13 22:41:34 +00:00
|
|
|
if (!setting)
|
2015-01-08 23:41:03 +00:00
|
|
|
return -1;
|
|
|
|
|
2015-02-09 16:03:16 +00:00
|
|
|
keybind = (struct retro_keybind*)setting->value.keybind;
|
2015-01-08 23:41:03 +00:00
|
|
|
if (!keybind)
|
|
|
|
return -1;
|
|
|
|
|
2015-03-21 03:43:18 +00:00
|
|
|
if (!global->menu.bind_mode_keyboard)
|
2015-01-08 23:41:03 +00:00
|
|
|
{
|
|
|
|
keybind->joykey = NO_BTN;
|
|
|
|
keybind->joyaxis = AXIS_NONE;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (setting->index_offset)
|
|
|
|
def_binds = (struct retro_keybind*)retro_keybinds_rest;
|
|
|
|
|
|
|
|
if (!def_binds)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
keybind->key = def_binds[setting->bind_type - MENU_SETTINGS_BIND_BEGIN].key;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-01-09 15:22:56 +00:00
|
|
|
/**
|
|
|
|
******* ACTION TOGGLE CALLBACK FUNCTIONS *******
|
|
|
|
**/
|
|
|
|
|
2015-01-08 23:07:42 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_action_toggle_analog_dpad_mode
|
2015-01-08 23:07:42 +00:00
|
|
|
* @data : pointer to setting
|
|
|
|
* @action : toggle action value. Can be either one of :
|
|
|
|
* MENU_ACTION_RIGHT | MENU_ACTION_LEFT
|
|
|
|
*
|
|
|
|
* Function callback for 'Analog D-Pad Mode' action's 'Action Toggle'
|
|
|
|
* function pointer.
|
|
|
|
*
|
|
|
|
* Returns: 0 on success, -1 on error.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_action_toggle_analog_dpad_mode(void *data,
|
2015-03-09 03:18:47 +00:00
|
|
|
unsigned action, bool wraparound)
|
2014-10-23 04:24:02 +00:00
|
|
|
{
|
|
|
|
unsigned port = 0;
|
2015-03-20 18:57:16 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
settings_t *settings = config_get_ptr();
|
2014-10-23 04:24:02 +00:00
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
port = setting->index_offset;
|
|
|
|
|
|
|
|
switch (action)
|
|
|
|
{
|
|
|
|
case MENU_ACTION_RIGHT:
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->input.analog_dpad_mode[port] =
|
|
|
|
(settings->input.analog_dpad_mode[port] + 1)
|
2014-10-23 04:24:02 +00:00
|
|
|
% ANALOG_DPAD_LAST;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MENU_ACTION_LEFT:
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->input.analog_dpad_mode[port] =
|
|
|
|
(settings->input.analog_dpad_mode
|
2014-10-23 04:24:02 +00:00
|
|
|
[port] + ANALOG_DPAD_LAST - 1) % ANALOG_DPAD_LAST;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-01-08 23:07:42 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_action_toggle_libretro_device_type
|
2015-01-08 23:07:42 +00:00
|
|
|
* @data : pointer to setting
|
|
|
|
* @action : toggle action value. Can be either one of :
|
|
|
|
* MENU_ACTION_RIGHT | MENU_ACTION_LEFT
|
|
|
|
*
|
|
|
|
* Function callback for 'Libretro Device Type' action's 'Action Toggle'
|
|
|
|
* function pointer.
|
|
|
|
*
|
|
|
|
* Returns: 0 on success, -1 on error.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_action_toggle_libretro_device_type(
|
2015-03-09 03:18:47 +00:00
|
|
|
void *data, unsigned action, bool wraparound)
|
2014-10-22 06:42:51 +00:00
|
|
|
{
|
2015-01-08 23:56:11 +00:00
|
|
|
unsigned current_device, current_idx, i, devices[128],
|
|
|
|
types = 0, port = 0;
|
|
|
|
const struct retro_controller_info *desc = NULL;
|
2015-03-20 18:57:16 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
settings_t *settings = config_get_ptr();
|
2015-03-21 03:43:18 +00:00
|
|
|
global_t *global = global_get_ptr();
|
2014-10-22 06:42:51 +00:00
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
port = setting->index_offset;
|
|
|
|
|
|
|
|
devices[types++] = RETRO_DEVICE_NONE;
|
|
|
|
devices[types++] = RETRO_DEVICE_JOYPAD;
|
|
|
|
|
|
|
|
/* Only push RETRO_DEVICE_ANALOG as default if we use an
|
|
|
|
* older core which doesn't use SET_CONTROLLER_INFO. */
|
2015-03-21 03:43:18 +00:00
|
|
|
if (!global->system.num_ports)
|
2014-10-22 06:42:51 +00:00
|
|
|
devices[types++] = RETRO_DEVICE_ANALOG;
|
|
|
|
|
2015-03-21 03:43:18 +00:00
|
|
|
if (port < global->system.num_ports)
|
|
|
|
desc = &global->system.ports[port];
|
|
|
|
|
2014-10-22 06:42:51 +00:00
|
|
|
if (desc)
|
|
|
|
{
|
|
|
|
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-03-20 18:57:16 +00:00
|
|
|
current_device = settings->input.libretro_device[port];
|
2014-10-22 06:42:51 +00:00
|
|
|
current_idx = 0;
|
|
|
|
for (i = 0; i < types; i++)
|
|
|
|
{
|
|
|
|
if (current_device == devices[i])
|
|
|
|
{
|
|
|
|
current_idx = i;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (action)
|
|
|
|
{
|
|
|
|
case MENU_ACTION_LEFT:
|
|
|
|
current_device = devices
|
|
|
|
[(current_idx + types - 1) % types];
|
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->input.libretro_device[port] = current_device;
|
2014-10-22 06:42:51 +00:00
|
|
|
pretro_set_controller_port_device(port, current_device);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MENU_ACTION_RIGHT:
|
|
|
|
current_device = devices
|
|
|
|
[(current_idx + 1) % types];
|
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->input.libretro_device[port] = current_device;
|
2014-10-22 06:42:51 +00:00
|
|
|
pretro_set_controller_port_device(port, current_device);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-01-08 23:07:42 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_action_toggle_savestates
|
2015-01-08 23:07:42 +00:00
|
|
|
* @data : pointer to setting
|
|
|
|
* @action : toggle action value. Can be either one of :
|
|
|
|
* MENU_ACTION_RIGHT | MENU_ACTION_LEFT
|
|
|
|
*
|
|
|
|
* Function callback for 'SaveStates' action's 'Action Toggle'
|
|
|
|
* function pointer.
|
|
|
|
*
|
|
|
|
* Returns: 0 on success, -1 on error.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_action_toggle_savestates(
|
2015-03-09 03:18:47 +00:00
|
|
|
void *data, unsigned action, bool wraparound)
|
2014-10-14 20:02:27 +00:00
|
|
|
{
|
2015-03-20 18:57:16 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
settings_t *settings = config_get_ptr();
|
2014-10-14 20:02:27 +00:00
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
switch (action)
|
|
|
|
{
|
|
|
|
case MENU_ACTION_LEFT:
|
2015-01-08 23:07:42 +00:00
|
|
|
/* Slot -1 is (auto) slot. */
|
2015-03-20 18:57:16 +00:00
|
|
|
if (settings->state_slot >= 0)
|
|
|
|
settings->state_slot--;
|
2014-10-14 20:02:27 +00:00
|
|
|
break;
|
|
|
|
case MENU_ACTION_RIGHT:
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->state_slot++;
|
2014-10-14 20:02:27 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-01-08 23:38:50 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_action_toggle_bind_device
|
2015-01-08 23:38:50 +00:00
|
|
|
* @data : pointer to setting
|
|
|
|
* @action : toggle action value. Can be either one of :
|
|
|
|
* MENU_ACTION_RIGHT | MENU_ACTION_LEFT
|
|
|
|
*
|
|
|
|
* Function callback for 'Bind Device' action's 'Action Toggle'
|
|
|
|
* function pointer.
|
|
|
|
*
|
|
|
|
* Returns: 0 on success, -1 on error.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_action_toggle_bind_device(void *data,
|
2015-03-09 03:18:47 +00:00
|
|
|
unsigned action, bool wraparound)
|
2014-10-24 07:16:50 +00:00
|
|
|
{
|
2014-10-24 07:52:35 +00:00
|
|
|
unsigned *p = NULL;
|
2015-03-20 18:57:16 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
settings_t *settings = config_get_ptr();
|
2014-10-24 07:16:50 +00:00
|
|
|
|
2014-10-24 07:55:33 +00:00
|
|
|
if (!setting)
|
2014-10-24 07:16:50 +00:00
|
|
|
return -1;
|
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
p = &settings->input.joypad_map[setting->index_offset];
|
2014-10-24 07:16:50 +00:00
|
|
|
|
2014-10-24 07:52:35 +00:00
|
|
|
switch (action)
|
2014-10-24 07:35:05 +00:00
|
|
|
{
|
2014-10-24 07:52:35 +00:00
|
|
|
case MENU_ACTION_LEFT:
|
2015-03-20 18:57:16 +00:00
|
|
|
if ((*p) >= settings->input.max_users)
|
|
|
|
*p = settings->input.max_users - 1;
|
2014-12-15 13:02:06 +00:00
|
|
|
else if ((*p) > 0)
|
2014-10-24 07:52:35 +00:00
|
|
|
(*p)--;
|
|
|
|
break;
|
|
|
|
case MENU_ACTION_RIGHT:
|
2015-03-20 18:57:16 +00:00
|
|
|
if (*p < settings->input.max_users)
|
2014-10-24 07:52:35 +00:00
|
|
|
(*p)++;
|
|
|
|
break;
|
2014-10-24 07:35:05 +00:00
|
|
|
}
|
2014-10-24 07:16:50 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_bool_action_toggle_default(void *data,
|
2015-03-09 03:18:47 +00:00
|
|
|
unsigned action, bool wraparound)
|
2015-01-08 23:38:50 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
switch (action)
|
|
|
|
{
|
|
|
|
case MENU_ACTION_LEFT:
|
|
|
|
case MENU_ACTION_RIGHT:
|
|
|
|
*setting->value.boolean = !(*setting->value.boolean);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_uint_action_toggle_default(void *data,
|
2015-03-09 03:18:47 +00:00
|
|
|
unsigned action, bool wraparound)
|
2015-01-08 23:38:50 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
switch (action)
|
|
|
|
{
|
|
|
|
case MENU_ACTION_LEFT:
|
|
|
|
if (*setting->value.unsigned_integer != setting->min)
|
|
|
|
*setting->value.unsigned_integer =
|
|
|
|
*setting->value.unsigned_integer - setting->step;
|
|
|
|
|
|
|
|
if (setting->enforce_minrange)
|
|
|
|
{
|
|
|
|
if (*setting->value.unsigned_integer < setting->min)
|
|
|
|
*setting->value.unsigned_integer = setting->min;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MENU_ACTION_RIGHT:
|
|
|
|
*setting->value.unsigned_integer =
|
|
|
|
*setting->value.unsigned_integer + setting->step;
|
|
|
|
|
|
|
|
if (setting->enforce_maxrange)
|
|
|
|
{
|
|
|
|
if (*setting->value.unsigned_integer > setting->max)
|
|
|
|
*setting->value.unsigned_integer = setting->max;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_fraction_action_toggle_default(
|
2015-03-09 03:18:47 +00:00
|
|
|
void *data, unsigned action, bool wraparound)
|
2015-01-08 23:38:50 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
switch (action)
|
|
|
|
{
|
|
|
|
case MENU_ACTION_LEFT:
|
|
|
|
*setting->value.fraction =
|
|
|
|
*setting->value.fraction - setting->step;
|
|
|
|
|
|
|
|
if (setting->enforce_minrange)
|
|
|
|
{
|
|
|
|
if (*setting->value.fraction < setting->min)
|
|
|
|
*setting->value.fraction = setting->min;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case MENU_ACTION_RIGHT:
|
|
|
|
*setting->value.fraction =
|
|
|
|
*setting->value.fraction + setting->step;
|
|
|
|
|
|
|
|
if (setting->enforce_maxrange)
|
|
|
|
{
|
|
|
|
if (*setting->value.fraction > setting->max)
|
|
|
|
*setting->value.fraction = setting->max;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_string_action_toggle_driver(void *data,
|
2015-03-09 03:18:47 +00:00
|
|
|
unsigned action, bool wraparound)
|
2015-01-08 23:38:50 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
switch (action)
|
|
|
|
{
|
|
|
|
case MENU_ACTION_LEFT:
|
2015-03-09 13:32:58 +00:00
|
|
|
if (!find_prev_driver(setting->name, setting->value.string, setting->size))
|
|
|
|
{
|
|
|
|
#if 0
|
|
|
|
if (wraparound)
|
|
|
|
find_last_driver(setting->name, setting->value.string, setting->size);
|
|
|
|
#endif
|
|
|
|
}
|
2015-01-08 23:38:50 +00:00
|
|
|
break;
|
|
|
|
case MENU_ACTION_RIGHT:
|
2015-03-09 13:32:58 +00:00
|
|
|
if (!find_next_driver(setting->name, setting->value.string, setting->size))
|
|
|
|
{
|
|
|
|
if (wraparound)
|
|
|
|
find_first_driver(setting->name, setting->value.string, setting->size);
|
|
|
|
}
|
2015-01-08 23:38:50 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-11 03:22:40 +00:00
|
|
|
#if defined(HAVE_DYNAMIC) || defined(HAVE_LIBRETRO_MANAGEMENT)
|
2015-03-09 03:18:47 +00:00
|
|
|
static int core_list_action_toggle(void *data, unsigned action, bool wraparound)
|
2015-01-08 23:38:50 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t *)data;
|
2015-03-20 18:57:16 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-01-08 23:38:50 +00:00
|
|
|
|
2015-01-08 23:56:11 +00:00
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
/* If the user CANCELs the browse, then settings->libretro is now
|
2015-01-08 23:38:50 +00:00
|
|
|
* set to a directory, which is very bad and will cause a crash
|
|
|
|
* later on. I need to be able to add something to call when a
|
|
|
|
* cancel happens.
|
|
|
|
*/
|
2015-03-20 18:57:16 +00:00
|
|
|
strlcpy(setting->value.string, settings->libretro_directory, setting->size);
|
2015-01-08 23:38:50 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-11 03:22:40 +00:00
|
|
|
static void core_list_change_handler(void *data)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t *)data;
|
|
|
|
(void)setting;
|
|
|
|
|
|
|
|
rarch_main_command(RARCH_CMD_LOAD_CORE);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2015-01-08 23:38:50 +00:00
|
|
|
/**
|
|
|
|
* load_content_action_toggle:
|
|
|
|
* @data : pointer to setting
|
|
|
|
* @action : toggle action value. Can be either one of :
|
|
|
|
* MENU_ACTION_RIGHT | MENU_ACTION_LEFT
|
|
|
|
*
|
|
|
|
* Function callback for 'Load Content' action's 'Action Toggle'
|
|
|
|
* function pointer.
|
|
|
|
*
|
|
|
|
* Returns: 0 on success, -1 on error.
|
|
|
|
**/
|
2015-03-09 03:18:47 +00:00
|
|
|
static int load_content_action_toggle(void *data, unsigned action,
|
|
|
|
bool wraparound)
|
2015-01-08 23:38:50 +00:00
|
|
|
{
|
2015-03-20 18:57:16 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t *)data;
|
|
|
|
settings_t *settings = config_get_ptr();
|
2015-03-21 03:43:18 +00:00
|
|
|
global_t *global = global_get_ptr();
|
2015-01-08 23:38:50 +00:00
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
strlcpy(setting->value.string, settings->menu_content_directory, setting->size);
|
2015-01-08 23:38:50 +00:00
|
|
|
|
2015-03-21 03:43:18 +00:00
|
|
|
if (global->menu.info.valid_extensions)
|
|
|
|
setting->values = global->menu.info.valid_extensions;
|
2015-01-08 23:38:50 +00:00
|
|
|
else
|
2015-03-21 03:43:18 +00:00
|
|
|
setting->values = global->system.valid_extensions;
|
2015-01-08 23:38:50 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-01-09 15:22:56 +00:00
|
|
|
/**
|
|
|
|
******* ACTION OK CALLBACK FUNCTIONS *******
|
|
|
|
**/
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_action_ok_bind_all(void *data, unsigned action)
|
2014-10-23 05:26:04 +00:00
|
|
|
{
|
2015-03-20 18:57:16 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-03-21 22:56:42 +00:00
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
2015-03-20 18:57:16 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-03-21 04:42:49 +00:00
|
|
|
global_t *global = global_get_ptr();
|
2014-10-23 05:26:04 +00:00
|
|
|
|
2015-02-13 22:41:34 +00:00
|
|
|
if (!setting || !menu)
|
2014-10-23 05:26:04 +00:00
|
|
|
return -1;
|
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
menu->binds.target = &settings->input.binds
|
2014-10-23 05:26:04 +00:00
|
|
|
[setting->index_offset][0];
|
2015-02-13 22:41:34 +00:00
|
|
|
menu->binds.begin = MENU_SETTINGS_BIND_BEGIN;
|
|
|
|
menu->binds.last = MENU_SETTINGS_BIND_LAST;
|
2014-10-23 05:26:04 +00:00
|
|
|
|
|
|
|
menu_list_push_stack(
|
2015-02-13 22:41:34 +00:00
|
|
|
menu->menu_list,
|
2014-10-23 05:26:04 +00:00
|
|
|
"",
|
2015-01-27 17:37:54 +00:00
|
|
|
"custom_bind_all",
|
2015-03-21 04:42:49 +00:00
|
|
|
global->menu.bind_mode_keyboard ?
|
2014-10-23 05:26:04 +00:00
|
|
|
MENU_SETTINGS_CUSTOM_BIND_KEYBOARD :
|
|
|
|
MENU_SETTINGS_CUSTOM_BIND,
|
2015-02-13 23:47:42 +00:00
|
|
|
menu->navigation.selection_ptr);
|
2014-10-23 05:26:04 +00:00
|
|
|
|
2015-03-21 04:42:49 +00:00
|
|
|
if (global->menu.bind_mode_keyboard)
|
2014-10-23 05:26:04 +00:00
|
|
|
{
|
2015-02-13 22:41:34 +00:00
|
|
|
menu->binds.timeout_end =
|
2014-10-23 05:26:04 +00:00
|
|
|
rarch_get_time_usec() +
|
|
|
|
MENU_KEYBOARD_BIND_TIMEOUT_SECONDS * 1000000;
|
2015-02-13 22:41:34 +00:00
|
|
|
input_keyboard_wait_keys(menu,
|
2015-01-11 05:42:53 +00:00
|
|
|
menu_input_custom_bind_keyboard_cb);
|
2014-10-23 05:26:04 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-02-13 22:41:34 +00:00
|
|
|
menu_input_poll_bind_get_rested_axes(&menu->binds);
|
|
|
|
menu_input_poll_bind_state(&menu->binds);
|
2014-10-23 05:26:04 +00:00
|
|
|
}
|
2015-02-13 22:41:34 +00:00
|
|
|
|
2014-10-23 05:26:04 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_action_ok_bind_defaults(void *data, unsigned action)
|
2014-10-23 05:26:04 +00:00
|
|
|
{
|
|
|
|
unsigned i;
|
|
|
|
struct retro_keybind *target = NULL;
|
|
|
|
const struct retro_keybind *def_binds = NULL;
|
2015-03-20 18:57:16 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-03-21 22:56:42 +00:00
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
2015-03-21 04:42:49 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
global_t *global = global_get_ptr();
|
2014-10-23 05:26:04 +00:00
|
|
|
|
2015-02-13 22:41:34 +00:00
|
|
|
if (!menu)
|
|
|
|
return -1;
|
2014-10-23 05:26:04 +00:00
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
target = (struct retro_keybind*)
|
2015-03-20 18:57:16 +00:00
|
|
|
&settings->input.binds[setting->index_offset][0];
|
2014-10-23 05:26:04 +00:00
|
|
|
def_binds = (setting->index_offset) ?
|
|
|
|
retro_keybinds_rest : retro_keybinds_1;
|
|
|
|
|
2015-02-13 22:41:34 +00:00
|
|
|
if (!target)
|
2014-10-23 05:26:04 +00:00
|
|
|
return -1;
|
|
|
|
|
2015-02-13 22:41:34 +00:00
|
|
|
menu->binds.begin = MENU_SETTINGS_BIND_BEGIN;
|
|
|
|
menu->binds.last = MENU_SETTINGS_BIND_LAST;
|
2014-10-23 05:26:04 +00:00
|
|
|
|
|
|
|
for (i = MENU_SETTINGS_BIND_BEGIN;
|
|
|
|
i <= MENU_SETTINGS_BIND_LAST; i++, target++)
|
|
|
|
{
|
2015-03-21 04:42:49 +00:00
|
|
|
if (global->menu.bind_mode_keyboard)
|
2014-10-23 05:26:04 +00:00
|
|
|
target->key = def_binds[i - MENU_SETTINGS_BIND_BEGIN].key;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
target->joykey = NO_BTN;
|
|
|
|
target->joyaxis = AXIS_NONE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_bool_action_ok_exit(void *data, unsigned action)
|
2014-10-16 00:53:35 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
2014-10-22 23:58:23 +00:00
|
|
|
if (setting->cmd_trigger.idx != RARCH_CMD_NONE)
|
|
|
|
{
|
|
|
|
rarch_main_command(setting->cmd_trigger.idx);
|
|
|
|
rarch_main_command(RARCH_CMD_RESUME);
|
|
|
|
}
|
2014-10-16 00:53:35 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2014-10-16 15:55:24 +00:00
|
|
|
|
2014-10-14 20:02:27 +00:00
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_bool_action_ok_default(void *data, unsigned action)
|
2014-10-16 00:53:35 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
if (setting->cmd_trigger.idx != RARCH_CMD_NONE)
|
|
|
|
setting->cmd_trigger.triggered = true;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2014-10-22 06:42:51 +00:00
|
|
|
|
2014-10-14 22:47:38 +00:00
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_uint_action_ok_default(void *data, unsigned action)
|
2014-10-16 00:53:35 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
if (setting->cmd_trigger.idx != RARCH_CMD_NONE)
|
|
|
|
setting->cmd_trigger.triggered = true;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_action_ok_video_refresh_rate_auto(
|
2014-10-14 22:56:20 +00:00
|
|
|
void *data, unsigned action)
|
|
|
|
{
|
2014-10-16 00:53:35 +00:00
|
|
|
double video_refresh_rate, deviation = 0.0;
|
|
|
|
unsigned sample_points = 0;
|
2014-10-14 22:56:20 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
2015-01-18 17:17:40 +00:00
|
|
|
if (video_monitor_fps_statistics(&video_refresh_rate,
|
2014-10-16 00:53:35 +00:00
|
|
|
&deviation, &sample_points))
|
2014-10-14 22:56:20 +00:00
|
|
|
{
|
2015-01-18 18:01:13 +00:00
|
|
|
driver_set_refresh_rate(video_refresh_rate);
|
2014-10-16 00:53:35 +00:00
|
|
|
/* Incase refresh rate update forced non-block video. */
|
|
|
|
rarch_main_command(RARCH_CMD_VIDEO_SET_BLOCKING_STATE);
|
2014-10-14 22:56:20 +00:00
|
|
|
}
|
|
|
|
|
2014-10-16 00:53:35 +00:00
|
|
|
if (setting->cmd_trigger.idx != RARCH_CMD_NONE)
|
|
|
|
setting->cmd_trigger.triggered = true;
|
|
|
|
|
2014-10-14 22:56:20 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_fraction_action_ok_default(
|
2014-10-16 00:53:35 +00:00
|
|
|
void *data, unsigned action)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
if (setting->cmd_trigger.idx != RARCH_CMD_NONE)
|
|
|
|
setting->cmd_trigger.triggered = true;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_uint_action_ok_linefeed(void *data, unsigned action)
|
2014-10-14 22:47:38 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
2015-02-13 19:19:20 +00:00
|
|
|
menu_input_key_start_line(setting->short_description,
|
2015-01-11 05:42:53 +00:00
|
|
|
setting->name, 0, 0, menu_input_st_uint_callback);
|
2014-10-14 22:47:38 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_hex_action_ok_linefeed(void *data, unsigned action)
|
2015-03-14 22:21:55 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
menu_input_key_start_line(setting->short_description,
|
|
|
|
setting->name, 0, 0, menu_input_st_hex_callback);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_action_action_ok(void *data, unsigned action)
|
2014-10-22 22:10:58 +00:00
|
|
|
{
|
2014-10-22 22:51:11 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2014-10-22 22:10:58 +00:00
|
|
|
|
2014-10-22 22:51:11 +00:00
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
2014-10-22 23:58:23 +00:00
|
|
|
if (setting->cmd_trigger.idx != RARCH_CMD_NONE)
|
|
|
|
rarch_main_command(setting->cmd_trigger.idx);
|
|
|
|
|
2014-10-22 22:51:11 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_bind_action_ok(void *data, unsigned action)
|
2015-01-08 23:42:42 +00:00
|
|
|
{
|
|
|
|
struct retro_keybind *keybind = NULL;
|
2015-03-21 04:42:49 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-03-21 22:56:42 +00:00
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
2015-03-21 04:42:49 +00:00
|
|
|
global_t *global = global_get_ptr();
|
2015-01-08 23:42:42 +00:00
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return -1;
|
|
|
|
|
2015-02-13 22:41:34 +00:00
|
|
|
if (!menu || !menu->menu_list)
|
2015-01-08 23:42:42 +00:00
|
|
|
return -1;
|
|
|
|
|
|
|
|
keybind = (struct retro_keybind*)setting->value.keybind;
|
|
|
|
|
|
|
|
if (!keybind)
|
|
|
|
return -1;
|
|
|
|
|
2015-02-13 22:41:34 +00:00
|
|
|
menu->binds.begin = setting->bind_type;
|
|
|
|
menu->binds.last = setting->bind_type;
|
|
|
|
menu->binds.target = keybind;
|
|
|
|
menu->binds.user = setting->index_offset;
|
2015-01-08 23:42:42 +00:00
|
|
|
menu_list_push_stack(
|
2015-02-13 22:41:34 +00:00
|
|
|
menu->menu_list,
|
2015-01-08 23:42:42 +00:00
|
|
|
"",
|
2015-01-27 17:47:57 +00:00
|
|
|
"custom_bind",
|
2015-03-21 04:42:49 +00:00
|
|
|
global->menu.bind_mode_keyboard ?
|
2015-01-08 23:42:42 +00:00
|
|
|
MENU_SETTINGS_CUSTOM_BIND_KEYBOARD : MENU_SETTINGS_CUSTOM_BIND,
|
2015-02-13 23:47:42 +00:00
|
|
|
menu->navigation.selection_ptr);
|
2015-01-08 23:42:42 +00:00
|
|
|
|
2015-03-21 04:42:49 +00:00
|
|
|
if (global->menu.bind_mode_keyboard)
|
2015-01-08 23:42:42 +00:00
|
|
|
{
|
2015-02-13 22:41:34 +00:00
|
|
|
menu->binds.timeout_end = rarch_get_time_usec() +
|
2015-01-08 23:42:42 +00:00
|
|
|
MENU_KEYBOARD_BIND_TIMEOUT_SECONDS * 1000000;
|
2015-02-13 22:41:34 +00:00
|
|
|
input_keyboard_wait_keys(menu,
|
2015-01-11 05:42:53 +00:00
|
|
|
menu_input_custom_bind_keyboard_cb);
|
2015-01-08 23:42:42 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-02-13 22:41:34 +00:00
|
|
|
menu_input_poll_bind_get_rested_axes(&menu->binds);
|
|
|
|
menu_input_poll_bind_state(&menu->binds);
|
2015-01-08 23:42:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static int setting_string_action_ok_allow_input(void *data,
|
2015-01-08 23:42:42 +00:00
|
|
|
unsigned action)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
2015-02-13 19:19:20 +00:00
|
|
|
if (!setting)
|
2015-01-08 23:42:42 +00:00
|
|
|
return -1;
|
|
|
|
|
2015-02-13 19:19:20 +00:00
|
|
|
menu_input_key_start_line(setting->short_description,
|
2015-01-11 05:42:53 +00:00
|
|
|
setting->name, 0, 0, menu_input_st_string_callback);
|
2015-01-08 23:42:42 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-01-09 15:22:56 +00:00
|
|
|
/**
|
|
|
|
******* ACTION CANCEL CALLBACK FUNCTIONS *******
|
|
|
|
**/
|
|
|
|
|
|
|
|
/**
|
|
|
|
******* SET LABEL CALLBACK FUNCTIONS *******
|
|
|
|
**/
|
|
|
|
|
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_get_string_representation_st_bool:
|
2015-01-09 15:22:56 +00:00
|
|
|
* @setting : pointer to setting
|
|
|
|
* @type_str : string for the type to be represented on-screen as
|
|
|
|
* a label.
|
|
|
|
* @type_str_size : size of @type_str
|
|
|
|
*
|
|
|
|
* Set a settings' label value. The setting is of type ST_BOOL.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_st_bool(void *data,
|
2015-01-09 15:22:56 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
2015-01-30 09:54:27 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
2015-01-09 15:22:56 +00:00
|
|
|
if (setting)
|
|
|
|
strlcpy(type_str, *setting->value.boolean ? setting->boolean.on_label :
|
|
|
|
setting->boolean.off_label, type_str_size);
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_st_action(void *data,
|
2015-02-15 03:49:57 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
strlcpy(type_str, "...", type_str_size);
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_st_group(void *data,
|
2015-01-30 09:35:06 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-01-30 09:54:27 +00:00
|
|
|
|
|
|
|
if (setting)
|
|
|
|
strlcpy(type_str, "...", type_str_size);
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_st_sub_group(void *data,
|
2015-01-30 09:54:27 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (setting)
|
|
|
|
strlcpy(type_str, "...", type_str_size);
|
2015-01-30 09:35:06 +00:00
|
|
|
}
|
|
|
|
|
2015-01-09 15:22:56 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_get_string_representation_st_float:
|
2015-01-09 15:22:56 +00:00
|
|
|
* @setting : pointer to setting
|
|
|
|
* @type_str : string for the type to be represented on-screen as
|
|
|
|
* a label.
|
|
|
|
* @type_str_size : size of @type_str
|
|
|
|
*
|
2015-01-30 09:54:27 +00:00
|
|
|
* Set a settings' label value. The setting is of type ST_FLOAT.
|
2015-01-09 15:22:56 +00:00
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_st_float(void *data,
|
2015-01-30 09:54:27 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
2015-01-30 09:59:28 +00:00
|
|
|
if (setting)
|
|
|
|
snprintf(type_str, type_str_size, setting->rounding_fraction,
|
|
|
|
*setting->value.fraction);
|
|
|
|
}
|
2015-01-30 09:54:27 +00:00
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_st_float_video_refresh_rate_auto(void *data,
|
2015-01-30 09:59:28 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
double video_refresh_rate = 0.0;
|
|
|
|
double deviation = 0.0;
|
|
|
|
unsigned sample_points = 0;
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
if (!setting)
|
2015-01-30 09:54:27 +00:00
|
|
|
return;
|
|
|
|
|
2015-01-30 09:59:28 +00:00
|
|
|
if (video_monitor_fps_statistics(&video_refresh_rate, &deviation, &sample_points))
|
2015-03-08 16:09:45 +00:00
|
|
|
{
|
2015-03-18 05:47:22 +00:00
|
|
|
runloop_t *runloop = rarch_main_get_ptr();
|
|
|
|
|
2015-01-30 09:59:28 +00:00
|
|
|
snprintf(type_str, type_str_size, "%.3f Hz (%.1f%% dev, %u samples)",
|
|
|
|
video_refresh_rate, 100.0 * deviation, sample_points);
|
2015-03-18 05:47:22 +00:00
|
|
|
runloop->frames.video.current.menu.label.is_updated = true;
|
2015-03-08 16:09:45 +00:00
|
|
|
}
|
2015-01-30 09:59:28 +00:00
|
|
|
else
|
|
|
|
strlcpy(type_str, "N/A", type_str_size);
|
2015-01-30 09:54:27 +00:00
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_st_dir(void *data,
|
2015-01-30 09:54:27 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (setting)
|
|
|
|
strlcpy(type_str,
|
|
|
|
*setting->value.string ?
|
|
|
|
setting->value.string : setting->dir.empty_path,
|
|
|
|
type_str_size);
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_st_path(void *data,
|
2015-01-30 09:54:27 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (setting)
|
|
|
|
strlcpy(type_str, path_basename(setting->value.string), type_str_size);
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_st_string(void *data,
|
2015-01-30 09:54:27 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (setting)
|
|
|
|
strlcpy(type_str, setting->value.string, type_str_size);
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_st_bind(void *data,
|
2015-01-30 09:54:27 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
const struct retro_keybind* keybind = NULL;
|
|
|
|
const struct retro_keybind* auto_bind = NULL;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return;
|
|
|
|
|
|
|
|
keybind = (const struct retro_keybind*)setting->value.keybind;
|
|
|
|
auto_bind = (const struct retro_keybind*)input_get_auto_bind(setting->index_offset, keybind->id);
|
|
|
|
|
|
|
|
input_get_bind_string(type_str, keybind, auto_bind, type_str_size);
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_int(void *data,
|
2015-01-30 09:54:27 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
|
|
|
|
if (setting)
|
|
|
|
snprintf(type_str, type_str_size, "%d", *setting->value.integer);
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_uint_video_monitor_index(void *data,
|
2015-01-09 15:22:56 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
2015-01-30 09:54:27 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-01-09 15:22:56 +00:00
|
|
|
if (!setting)
|
|
|
|
return;
|
|
|
|
|
2015-01-30 10:12:59 +00:00
|
|
|
if (*setting->value.unsigned_integer)
|
|
|
|
snprintf(type_str, type_str_size, "%u",
|
|
|
|
*setting->value.unsigned_integer);
|
|
|
|
else
|
|
|
|
strlcpy(type_str, "0 (Auto)", type_str_size);
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_uint_video_rotation(void *data,
|
2015-01-30 10:12:59 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
if (setting)
|
2015-01-09 15:22:56 +00:00
|
|
|
strlcpy(type_str, rotation_lut[*setting->value.unsigned_integer],
|
|
|
|
type_str_size);
|
2015-01-30 10:12:59 +00:00
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_uint_aspect_ratio_index(void *data,
|
2015-01-30 10:12:59 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
if (setting)
|
2015-01-09 15:22:56 +00:00
|
|
|
strlcpy(type_str,
|
|
|
|
aspectratio_lut[*setting->value.unsigned_integer].name,
|
|
|
|
type_str_size);
|
2015-01-30 10:12:59 +00:00
|
|
|
}
|
2015-01-09 15:22:56 +00:00
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_uint_libretro_device(void *data,
|
2015-01-30 10:12:59 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
const struct retro_controller_description *desc = NULL;
|
|
|
|
const char *name = NULL;
|
2015-03-20 18:57:16 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
settings_t *settings = config_get_ptr();
|
2015-03-21 04:42:49 +00:00
|
|
|
global_t *global = global_get_ptr();
|
2015-03-20 18:57:16 +00:00
|
|
|
|
2015-01-30 10:12:59 +00:00
|
|
|
if (!setting)
|
|
|
|
return;
|
2015-01-09 15:22:56 +00:00
|
|
|
|
2015-03-21 04:42:49 +00:00
|
|
|
if (setting->index_offset < global->system.num_ports)
|
2015-01-30 10:12:59 +00:00
|
|
|
desc = libretro_find_controller_description(
|
2015-03-21 04:42:49 +00:00
|
|
|
&global->system.ports[setting->index_offset],
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->input.libretro_device
|
2015-01-30 10:12:59 +00:00
|
|
|
[setting->index_offset]);
|
|
|
|
|
|
|
|
if (desc)
|
|
|
|
name = desc->desc;
|
|
|
|
|
|
|
|
if (!name)
|
2015-01-09 15:22:56 +00:00
|
|
|
{
|
2015-01-30 10:12:59 +00:00
|
|
|
/* Find generic name. */
|
2015-01-09 15:22:56 +00:00
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
switch (settings->input.libretro_device
|
2015-01-30 10:12:59 +00:00
|
|
|
[setting->index_offset])
|
2015-01-09 15:22:56 +00:00
|
|
|
{
|
2015-01-30 10:12:59 +00:00
|
|
|
case RETRO_DEVICE_NONE:
|
|
|
|
name = "None";
|
2015-01-09 15:22:56 +00:00
|
|
|
break;
|
2015-01-30 10:12:59 +00:00
|
|
|
case RETRO_DEVICE_JOYPAD:
|
|
|
|
name = "RetroPad";
|
2015-01-09 15:22:56 +00:00
|
|
|
break;
|
2015-01-30 10:12:59 +00:00
|
|
|
case RETRO_DEVICE_ANALOG:
|
|
|
|
name = "RetroPad w/ Analog";
|
2015-01-09 15:22:56 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
name = "Unknown";
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-30 10:12:59 +00:00
|
|
|
strlcpy(type_str, name, type_str_size);
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_uint_archive_mode(void *data,
|
2015-01-30 10:12:59 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
const char *name = "Unknown";
|
2015-03-20 18:57:16 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-01-30 10:12:59 +00:00
|
|
|
|
|
|
|
(void)data;
|
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
switch (settings->archive.mode)
|
2015-01-30 10:12:59 +00:00
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
name = "Ask";
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
name = "Load Archive";
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
name = "Open Archive";
|
|
|
|
break;
|
2015-01-09 15:22:56 +00:00
|
|
|
}
|
2015-01-30 10:12:59 +00:00
|
|
|
|
|
|
|
strlcpy(type_str, name, type_str_size);
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_uint_analog_dpad_mode(void *data,
|
2015-01-30 10:12:59 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
static const char *modes[] = {
|
|
|
|
"None",
|
|
|
|
"Left Analog",
|
|
|
|
"Right Analog",
|
|
|
|
};
|
2015-03-20 18:57:16 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
settings_t *settings = config_get_ptr();
|
2015-01-30 10:12:59 +00:00
|
|
|
if (!setting)
|
|
|
|
return;
|
|
|
|
|
|
|
|
(void)data;
|
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
strlcpy(type_str, modes[settings->input.analog_dpad_mode
|
2015-01-30 10:12:59 +00:00
|
|
|
[setting->index_offset] % ANALOG_DPAD_LAST],
|
|
|
|
type_str_size);
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_uint_autosave_interval(void *data,
|
2015-01-30 10:12:59 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
if (!setting)
|
|
|
|
return;
|
|
|
|
|
2015-01-30 10:25:58 +00:00
|
|
|
if (*setting->value.unsigned_integer)
|
|
|
|
snprintf(type_str, type_str_size, "%u seconds",
|
|
|
|
*setting->value.unsigned_integer);
|
2015-01-09 15:22:56 +00:00
|
|
|
else
|
2015-01-30 10:25:58 +00:00
|
|
|
strlcpy(type_str, "OFF", type_str_size);
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_uint_user_language(void *data,
|
2015-01-30 10:25:58 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
static const char *modes[] = {
|
|
|
|
"English",
|
|
|
|
"Japanese",
|
|
|
|
"French",
|
|
|
|
"Spanish",
|
|
|
|
"German",
|
|
|
|
"Italian",
|
|
|
|
"Dutch",
|
|
|
|
"Portuguese",
|
|
|
|
"Russian",
|
|
|
|
"Korean",
|
|
|
|
"Chinese (Traditional)",
|
|
|
|
"Chinese (Simplified)"
|
|
|
|
};
|
2015-03-20 18:57:16 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
settings_t *settings = config_get_ptr();
|
2015-01-30 10:25:58 +00:00
|
|
|
if (!setting)
|
|
|
|
return;
|
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
strlcpy(type_str, modes[settings->user_language], type_str_size);
|
2015-01-30 10:25:58 +00:00
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_uint_libretro_log_level(void *data,
|
2015-01-30 10:25:58 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
if (!setting)
|
|
|
|
return;
|
|
|
|
static const char *modes[] = {
|
|
|
|
"0 (Debug)",
|
|
|
|
"1 (Info)",
|
|
|
|
"2 (Warning)",
|
|
|
|
"3 (Error)"
|
|
|
|
};
|
|
|
|
|
|
|
|
strlcpy(type_str, modes[*setting->value.unsigned_integer],
|
|
|
|
type_str_size);
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_uint(void *data,
|
2015-01-30 10:25:58 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
if (setting)
|
2015-01-09 15:22:56 +00:00
|
|
|
snprintf(type_str, type_str_size, "%u",
|
|
|
|
*setting->value.unsigned_integer);
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_get_string_representation_hex(void *data,
|
2015-03-14 22:21:55 +00:00
|
|
|
char *type_str, size_t type_str_size)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
if (setting)
|
|
|
|
snprintf(type_str, type_str_size, "%08x",
|
|
|
|
*setting->value.unsigned_integer);
|
|
|
|
}
|
|
|
|
|
2015-01-09 15:22:56 +00:00
|
|
|
/**
|
|
|
|
******* LIST BUILDING HELPER FUNCTIONS *******
|
|
|
|
**/
|
|
|
|
|
2015-01-09 15:45:58 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_action_setting:
|
2015-01-09 15:45:58 +00:00
|
|
|
* @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-03-20 23:56:26 +00:00
|
|
|
rarch_setting_t setting_action_setting(const char* name,
|
2014-10-22 22:51:11 +00:00
|
|
|
const char* short_description,
|
|
|
|
const char *group, const char *subgroup)
|
|
|
|
{
|
2015-01-09 15:22:56 +00:00
|
|
|
rarch_setting_t result;
|
|
|
|
|
|
|
|
memset(&result, 0, sizeof(result));
|
2014-10-22 22:51:11 +00:00
|
|
|
|
2015-01-09 15:22:56 +00:00
|
|
|
result.type = ST_ACTION;
|
|
|
|
result.name = name;
|
|
|
|
|
|
|
|
result.short_description = short_description;
|
|
|
|
result.group = group;
|
|
|
|
result.subgroup = subgroup;
|
|
|
|
result.change_handler = NULL;
|
|
|
|
result.deferred_handler = NULL;
|
|
|
|
result.read_handler = NULL;
|
2015-03-20 23:56:26 +00:00
|
|
|
result.get_string_representation = &setting_get_string_representation_st_action;
|
2014-10-22 23:53:24 +00:00
|
|
|
result.action_start = NULL;
|
2015-01-26 09:18:13 +00:00
|
|
|
result.action_iterate = NULL;
|
2014-10-22 23:53:24 +00:00
|
|
|
result.action_toggle = NULL;
|
2015-03-20 23:56:26 +00:00
|
|
|
result.action_ok = setting_action_action_ok;
|
2015-01-09 03:43:24 +00:00
|
|
|
result.action_cancel = NULL;
|
2015-01-09 15:22:56 +00:00
|
|
|
|
2014-10-22 22:10:58 +00:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2015-01-09 15:45:58 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_group_setting:
|
2015-01-09 15:45:58 +00:00
|
|
|
* @type : type of settting.
|
|
|
|
* @name : name of setting.
|
|
|
|
*
|
|
|
|
* Initializes a setting of type ST_GROUP.
|
|
|
|
*
|
|
|
|
* Returns: setting of type ST_GROUP.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
rarch_setting_t setting_group_setting(enum setting_type type, const char* name)
|
2013-11-22 14:30:02 +00:00
|
|
|
{
|
2015-01-09 15:22:56 +00:00
|
|
|
rarch_setting_t result;
|
2014-08-25 14:05:59 +00:00
|
|
|
|
2015-01-09 15:22:56 +00:00
|
|
|
memset(&result, 0, sizeof(result));
|
|
|
|
|
|
|
|
result.type = type;
|
|
|
|
result.name = name;
|
2014-08-25 14:05:59 +00:00
|
|
|
result.short_description = name;
|
2015-01-09 15:22:56 +00:00
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
result.get_string_representation = &setting_get_string_representation_st_group;
|
2015-01-30 09:54:27 +00:00
|
|
|
|
2013-11-22 14:30:02 +00:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2015-01-09 15:45:58 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_subgroup_setting:
|
2015-01-09 15:45:58 +00:00
|
|
|
* @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.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
rarch_setting_t setting_subgroup_setting(enum setting_type type,
|
2015-01-09 15:45:58 +00:00
|
|
|
const char* name, const char *parent_name)
|
2014-09-09 17:45:15 +00:00
|
|
|
{
|
2015-01-09 15:22:56 +00:00
|
|
|
rarch_setting_t result;
|
|
|
|
|
|
|
|
memset(&result, 0, sizeof(result));
|
|
|
|
|
|
|
|
result.type = type;
|
|
|
|
result.name = name;
|
2014-09-09 17:45:15 +00:00
|
|
|
|
|
|
|
result.short_description = name;
|
2015-01-09 15:22:56 +00:00
|
|
|
result.group = parent_name;
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
result.get_string_representation = &setting_get_string_representation_st_sub_group;
|
2015-01-30 09:54:27 +00:00
|
|
|
|
2014-09-09 17:45:15 +00:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2015-01-09 15:45:58 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_float_setting:
|
2015-01-09 15:45:58 +00:00
|
|
|
* @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.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
rarch_setting_t setting_float_setting(const char* name,
|
2014-08-17 14:42:48 +00:00
|
|
|
const char* short_description, float* target, float default_value,
|
2015-01-09 15:45:58 +00:00
|
|
|
const char *rounding, const char *group, const char *subgroup,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
2014-07-20 15:25:08 +00:00
|
|
|
{
|
2015-01-09 15:22:56 +00:00
|
|
|
rarch_setting_t result;
|
2014-09-10 20:05:11 +00:00
|
|
|
|
2015-01-09 15:22:56 +00:00
|
|
|
memset(&result, 0, sizeof(result));
|
2014-10-14 22:56:20 +00:00
|
|
|
|
2015-01-09 15:22:56 +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.rounding_fraction = rounding;
|
|
|
|
result.change_handler = change_handler;
|
|
|
|
result.read_handler = read_handler;
|
|
|
|
result.value.fraction = target;
|
|
|
|
result.original_value.fraction = *target;
|
|
|
|
result.default_value.fraction = default_value;
|
2015-03-20 23:56:26 +00:00
|
|
|
result.action_start = setting_fraction_action_start_default;
|
|
|
|
result.action_toggle = setting_fraction_action_toggle_default;
|
|
|
|
result.action_ok = setting_fraction_action_ok_default;
|
2015-01-09 15:22:56 +00:00
|
|
|
result.action_cancel = NULL;
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
result.get_string_representation = &setting_get_string_representation_st_float;
|
2015-01-30 09:54:27 +00:00
|
|
|
|
2014-07-20 15:25:08 +00:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2015-01-09 15:45:58 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_bool_setting:
|
2015-01-09 15:45:58 +00:00
|
|
|
* @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.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
rarch_setting_t setting_bool_setting(const char* name,
|
2014-08-17 14:42:48 +00:00
|
|
|
const char* short_description, bool* target, bool default_value,
|
2014-08-27 19:14:36 +00:00
|
|
|
const char *off, const char *on,
|
2015-01-09 15:45:58 +00:00
|
|
|
const char *group, const char *subgroup,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
2014-07-20 15:25:08 +00:00
|
|
|
{
|
2015-01-09 15:22:56 +00:00
|
|
|
rarch_setting_t result;
|
|
|
|
|
|
|
|
memset(&result, 0, sizeof(result));
|
|
|
|
|
|
|
|
result.type = ST_BOOL;
|
|
|
|
result.name = name;
|
|
|
|
result.size = sizeof(bool);
|
|
|
|
result.short_description = short_description;
|
|
|
|
result.group = group;
|
|
|
|
result.subgroup = subgroup;
|
|
|
|
|
|
|
|
result.change_handler = change_handler;
|
|
|
|
result.read_handler = read_handler;
|
|
|
|
result.value.boolean = target;
|
2014-10-09 10:09:36 +00:00
|
|
|
result.original_value.boolean = *target;
|
2015-01-09 15:22:56 +00:00
|
|
|
result.default_value.boolean = default_value;
|
|
|
|
result.boolean.off_label = off;
|
|
|
|
result.boolean.on_label = on;
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
result.action_start = setting_bool_action_start_default;
|
|
|
|
result.action_toggle = setting_bool_action_toggle_default;
|
|
|
|
result.action_ok = setting_bool_action_ok_default;
|
2015-01-09 15:22:56 +00:00
|
|
|
result.action_cancel = NULL;
|
2015-01-30 09:54:27 +00:00
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
result.get_string_representation = &setting_get_string_representation_st_bool;
|
2014-07-20 15:25:08 +00:00
|
|
|
return result;
|
2013-11-22 14:30:02 +00:00
|
|
|
}
|
|
|
|
|
2015-01-09 15:45:58 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_int_setting:
|
2015-01-09 15:45:58 +00:00
|
|
|
* @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.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
rarch_setting_t setting_int_setting(const char* name,
|
2014-08-17 14:42:48 +00:00
|
|
|
const char* short_description, int* target, int default_value,
|
2014-09-11 01:42:07 +00:00
|
|
|
const char *group, const char *subgroup, change_handler_t change_handler,
|
|
|
|
change_handler_t read_handler)
|
2014-07-20 15:25:08 +00:00
|
|
|
{
|
2015-01-09 15:22:56 +00:00
|
|
|
rarch_setting_t result;
|
2014-10-06 20:15:10 +00:00
|
|
|
|
2015-01-09 15:22:56 +00:00
|
|
|
memset(&result, 0, sizeof(result));
|
|
|
|
|
|
|
|
result.type = ST_INT;
|
|
|
|
result.name = name;
|
|
|
|
result.size = sizeof(int);
|
|
|
|
result.short_description = short_description;
|
|
|
|
result.group = group;
|
|
|
|
result.subgroup = subgroup;
|
|
|
|
|
|
|
|
result.change_handler = change_handler;
|
|
|
|
result.read_handler = read_handler;
|
|
|
|
result.value.integer = target;
|
2014-10-09 10:09:36 +00:00
|
|
|
result.original_value.integer = *target;
|
2015-01-09 15:22:56 +00:00
|
|
|
result.default_value.integer = default_value;
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
result.get_string_representation = &setting_get_string_representation_int;
|
2015-01-30 09:54:27 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
return result;
|
2014-07-20 15:25:08 +00:00
|
|
|
}
|
|
|
|
|
2015-01-09 15:45:58 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_uint_setting:
|
2015-01-09 15:45:58 +00:00
|
|
|
* @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.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
rarch_setting_t setting_uint_setting(const char* name,
|
2014-08-17 14:42:48 +00:00
|
|
|
const char* short_description, unsigned int* target,
|
|
|
|
unsigned int default_value, const char *group, const char *subgroup,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
2014-07-20 15:25:08 +00:00
|
|
|
{
|
2015-01-09 15:22:56 +00:00
|
|
|
rarch_setting_t result;
|
2014-09-11 01:42:07 +00:00
|
|
|
|
2015-01-09 15:22:56 +00:00
|
|
|
memset(&result, 0, sizeof(result));
|
|
|
|
|
|
|
|
result.type = ST_UINT;
|
|
|
|
result.name = name;
|
|
|
|
result.size = sizeof(unsigned int);
|
|
|
|
result.short_description = short_description;
|
|
|
|
result.group = group;
|
|
|
|
result.subgroup = subgroup;
|
|
|
|
|
|
|
|
result.change_handler = change_handler;
|
|
|
|
result.read_handler = read_handler;
|
|
|
|
result.value.unsigned_integer = target;
|
2014-10-09 10:09:36 +00:00
|
|
|
result.original_value.unsigned_integer = *target;
|
2015-01-09 15:22:56 +00:00
|
|
|
result.default_value.unsigned_integer = default_value;
|
2015-03-20 23:56:26 +00:00
|
|
|
result.action_start = setting_uint_action_start_default;
|
|
|
|
result.action_toggle = setting_uint_action_toggle_default;
|
|
|
|
result.action_ok = setting_uint_action_ok_default;
|
2015-01-09 15:22:56 +00:00
|
|
|
result.action_cancel = NULL;
|
2015-03-20 23:56:26 +00:00
|
|
|
result.get_string_representation = &setting_get_string_representation_uint;
|
2014-08-17 14:42:48 +00:00
|
|
|
|
2015-01-09 15:22:56 +00:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2015-03-14 22:21:55 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_uint_setting:
|
2015-03-14 22:21:55 +00:00
|
|
|
* @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.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
rarch_setting_t setting_hex_setting(const char* name,
|
2015-03-14 22:21:55 +00:00
|
|
|
const char* short_description, unsigned int* target,
|
|
|
|
unsigned int default_value, const char *group, const char *subgroup,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
|
|
|
{
|
|
|
|
rarch_setting_t result;
|
|
|
|
|
|
|
|
memset(&result, 0, sizeof(result));
|
|
|
|
|
|
|
|
result.type = ST_HEX;
|
|
|
|
result.name = name;
|
|
|
|
result.size = sizeof(unsigned int);
|
|
|
|
result.short_description = short_description;
|
|
|
|
result.group = group;
|
|
|
|
result.subgroup = subgroup;
|
|
|
|
|
|
|
|
result.change_handler = change_handler;
|
|
|
|
result.read_handler = read_handler;
|
|
|
|
result.value.unsigned_integer = target;
|
|
|
|
result.original_value.unsigned_integer = *target;
|
|
|
|
result.default_value.unsigned_integer = default_value;
|
2015-03-20 23:56:26 +00:00
|
|
|
result.action_start = setting_uint_action_start_default;
|
2015-03-14 22:21:55 +00:00
|
|
|
result.action_toggle = NULL;
|
2015-03-20 23:56:26 +00:00
|
|
|
result.action_ok = setting_uint_action_ok_default;
|
2015-03-14 22:21:55 +00:00
|
|
|
result.action_cancel = NULL;
|
2015-03-20 23:56:26 +00:00
|
|
|
result.get_string_representation = &setting_get_string_representation_hex;
|
2015-03-14 22:21:55 +00:00
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2015-01-09 15:45:58 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_bind_setting:
|
2015-01-09 15:45:58 +00:00
|
|
|
* @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.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
rarch_setting_t setting_bind_setting(const char* name,
|
2015-01-09 15:22:56 +00:00
|
|
|
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)
|
|
|
|
{
|
|
|
|
rarch_setting_t result;
|
|
|
|
|
|
|
|
memset(&result, 0, sizeof(result));
|
|
|
|
|
|
|
|
result.type = ST_BIND;
|
|
|
|
result.name = name;
|
|
|
|
result.size = 0;
|
|
|
|
result.short_description = short_description;
|
|
|
|
result.group = group;
|
|
|
|
result.subgroup = subgroup;
|
|
|
|
|
|
|
|
result.value.keybind = target;
|
|
|
|
result.default_value.keybind = default_value;
|
|
|
|
result.index = idx;
|
|
|
|
result.index_offset = idx_offset;
|
2015-03-20 23:56:26 +00:00
|
|
|
result.action_start = setting_bind_action_start;
|
|
|
|
result.action_ok = setting_bind_action_ok;
|
2015-01-09 15:22:56 +00:00
|
|
|
result.action_cancel = NULL;
|
2015-03-20 23:56:26 +00:00
|
|
|
result.get_string_representation = &setting_get_string_representation_st_bind;
|
2014-10-14 22:47:38 +00:00
|
|
|
|
2014-07-20 15:25:08 +00:00
|
|
|
return result;
|
|
|
|
}
|
2013-11-22 14:30:02 +00:00
|
|
|
|
2015-01-09 15:45:58 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_string_setting:
|
2015-01-09 15:45:58 +00:00
|
|
|
* @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.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
rarch_setting_t setting_string_setting(enum setting_type type,
|
2014-07-27 02:30:06 +00:00
|
|
|
const char* name, const char* short_description, char* target,
|
2014-08-24 18:19:59 +00:00
|
|
|
unsigned size, const char* default_value, const char *empty,
|
2014-09-11 01:42:07 +00:00
|
|
|
const char *group, const char *subgroup, change_handler_t change_handler,
|
|
|
|
change_handler_t read_handler)
|
2013-11-22 14:30:02 +00:00
|
|
|
{
|
2015-01-09 15:22:56 +00:00
|
|
|
rarch_setting_t result;
|
|
|
|
|
|
|
|
memset(&result, 0, sizeof(result));
|
|
|
|
|
|
|
|
result.type = type;
|
|
|
|
result.name = name;
|
|
|
|
result.size = size;
|
|
|
|
result.short_description = short_description;
|
|
|
|
result.group = group;
|
|
|
|
result.subgroup = subgroup;
|
2014-10-06 20:15:10 +00:00
|
|
|
|
2014-10-16 16:07:57 +00:00
|
|
|
result.dir.empty_path = empty;
|
|
|
|
result.change_handler = change_handler;
|
|
|
|
result.read_handler = read_handler;
|
|
|
|
result.value.string = target;
|
2013-11-22 14:30:02 +00:00
|
|
|
result.default_value.string = default_value;
|
2014-10-16 16:07:57 +00:00
|
|
|
result.action_start = NULL;
|
2015-03-20 23:56:26 +00:00
|
|
|
result.get_string_representation = &setting_get_string_representation_st_string;
|
2014-08-17 14:42:48 +00:00
|
|
|
|
2014-10-16 16:07:57 +00:00
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case ST_DIR:
|
2015-03-20 23:56:26 +00:00
|
|
|
result.action_start = setting_string_dir_action_start_default;
|
2015-01-10 04:25:37 +00:00
|
|
|
result.browser_selection_type = ST_DIR;
|
2015-03-20 23:56:26 +00:00
|
|
|
result.get_string_representation = &setting_get_string_representation_st_dir;
|
2014-10-16 16:07:57 +00:00
|
|
|
break;
|
|
|
|
case ST_PATH:
|
2015-03-20 23:56:26 +00:00
|
|
|
result.action_start = setting_string_dir_action_start_default;
|
2015-01-10 04:25:37 +00:00
|
|
|
result.browser_selection_type = ST_PATH;
|
2015-03-20 23:56:26 +00:00
|
|
|
result.get_string_representation = &setting_get_string_representation_st_path;
|
2014-10-16 16:07:57 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2014-10-16 15:55:24 +00:00
|
|
|
|
2013-11-22 14:30:02 +00:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2015-01-13 23:35:27 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_string_setting_options:
|
2015-01-13 23:35:27 +00:00
|
|
|
* @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.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
rarch_setting_t setting_string_setting_options(enum setting_type type,
|
2014-11-11 17:11:48 +00:00
|
|
|
const char* name, const char* short_description, char* target,
|
2015-01-09 15:45:58 +00:00
|
|
|
unsigned size, const char* default_value,
|
|
|
|
const char *empty, const char *values,
|
|
|
|
const char *group, const char *subgroup,
|
|
|
|
change_handler_t change_handler, change_handler_t read_handler)
|
2014-11-11 17:11:48 +00:00
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
rarch_setting_t result = setting_string_setting(type, name,
|
2015-01-08 23:23:59 +00:00
|
|
|
short_description, target, size, default_value, empty, group,
|
|
|
|
subgroup, change_handler, read_handler);
|
2015-01-09 15:22:56 +00:00
|
|
|
|
|
|
|
result.values = values;
|
2014-11-11 17:11:48 +00:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2015-01-08 23:23:59 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_get_description:
|
2015-01-08 23:23:59 +00:00
|
|
|
* @label : identifier label of setting
|
|
|
|
* @msg : output message
|
|
|
|
* @sizeof_msg : size of @msg
|
|
|
|
*
|
|
|
|
* Writes a 'Help' description message to @msg if there is
|
|
|
|
* one available based on the identifier label of the setting
|
|
|
|
* (@label).
|
|
|
|
*
|
|
|
|
* Returns: 0 (always for now). TODO: make it handle -1 as well.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
int setting_get_description(const char *label, char *msg,
|
2014-08-17 14:42:48 +00:00
|
|
|
size_t sizeof_msg)
|
2014-07-27 02:30:06 +00:00
|
|
|
{
|
2015-03-20 18:57:16 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
if (!strcmp(label, "input_driver"))
|
|
|
|
{
|
2015-03-20 18:57:16 +00:00
|
|
|
if (!strcmp(settings->input.driver, "udev"))
|
2014-07-27 02:30:06 +00:00
|
|
|
snprintf(msg, sizeof_msg,
|
2014-10-06 20:15:10 +00:00
|
|
|
" -- udev Input driver. \n"
|
|
|
|
" \n"
|
|
|
|
"This driver can run without X. \n"
|
2014-07-27 02:30:06 +00:00
|
|
|
" \n"
|
2014-10-06 20:15:10 +00:00
|
|
|
"It uses the recent evdev joypad API \n"
|
|
|
|
"for joystick support. It supports \n"
|
|
|
|
"hotplugging and force feedback (if \n"
|
|
|
|
"supported by device). \n"
|
2014-07-27 02:30:06 +00:00
|
|
|
" \n"
|
2014-10-06 20:15:10 +00:00
|
|
|
"The driver reads evdev events for keyboard \n"
|
|
|
|
"support. It also supports keyboard callback, \n"
|
|
|
|
"mice and touchpads. \n"
|
2014-07-27 02:30:06 +00:00
|
|
|
" \n"
|
2014-10-06 20:15:10 +00:00
|
|
|
"By default in most distros, /dev/input nodes \n"
|
|
|
|
"are root-only (mode 600). You can set up a udev \n"
|
|
|
|
"rule which makes these accessible to non-root."
|
2014-07-27 02:30:06 +00:00
|
|
|
);
|
2015-03-20 18:57:16 +00:00
|
|
|
else if (!strcmp(settings->input.driver, "linuxraw"))
|
2014-07-27 02:30:06 +00:00
|
|
|
snprintf(msg, sizeof_msg,
|
2014-10-06 20:15:10 +00:00
|
|
|
" -- linuxraw Input driver. \n"
|
|
|
|
" \n"
|
|
|
|
"This driver requires an active TTY. Keyboard \n"
|
|
|
|
"events are read directly from the TTY which \n"
|
2014-12-04 12:26:27 +00:00
|
|
|
"makes it simpler, but not as flexible as udev. \n" "Mice, etc, are not supported at all. \n"
|
2014-10-06 20:15:10 +00:00
|
|
|
" \n"
|
|
|
|
"This driver uses the older joystick API \n"
|
|
|
|
"(/dev/input/js*).");
|
|
|
|
else
|
2014-07-27 02:30:06 +00:00
|
|
|
snprintf(msg, sizeof_msg,
|
2014-10-06 20:15:10 +00:00
|
|
|
" -- Input driver.\n"
|
2014-07-27 02:30:06 +00:00
|
|
|
" \n"
|
2014-10-06 20:15:10 +00:00
|
|
|
"Depending on video driver, it might \n"
|
|
|
|
"force a different input driver.");
|
|
|
|
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "load_content"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Load Content. \n"
|
|
|
|
"Browse for content. \n"
|
|
|
|
" \n"
|
|
|
|
"To load content, you need a \n"
|
|
|
|
"libretro core to use, and a \n"
|
|
|
|
"content file. \n"
|
|
|
|
" \n"
|
|
|
|
"To control where the menu starts \n"
|
|
|
|
" to browse for content, set \n"
|
|
|
|
"Browser Directory. If not set, \n"
|
|
|
|
"it will start in root. \n"
|
|
|
|
" \n"
|
|
|
|
"The browser will filter out \n"
|
|
|
|
"extensions for the last core set \n"
|
|
|
|
"in 'Core', and use that core when \n"
|
|
|
|
"content is loaded."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "core_list"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Core Selection. \n"
|
|
|
|
" \n"
|
|
|
|
"Browse for a libretro core \n"
|
|
|
|
"implementation. Where the browser \n"
|
|
|
|
"starts depends on your Core Directory \n"
|
|
|
|
"path. If blank, it will start in root. \n"
|
|
|
|
" \n"
|
|
|
|
"If Core Directory is a directory, the menu \n"
|
|
|
|
"will use that as top folder. If Core \n"
|
|
|
|
"Directory is a full path, it will start \n"
|
|
|
|
"in the folder where the file is.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "history_list"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Loading content from history. \n"
|
|
|
|
" \n"
|
|
|
|
"As content is loaded, content and libretro \n"
|
|
|
|
"core combinations are saved to history. \n"
|
|
|
|
" \n"
|
|
|
|
"The history is saved to a file in the same \n"
|
|
|
|
"directory as the RetroArch config file. If \n"
|
|
|
|
"no config file was loaded in startup, history \n"
|
|
|
|
"will not be saved or loaded, and will not exist \n"
|
|
|
|
"in the main menu."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "audio_resampler_driver"))
|
|
|
|
{
|
2015-03-20 18:57:16 +00:00
|
|
|
if (!strcmp(settings->audio.resampler, "sinc"))
|
2014-10-06 20:15:10 +00:00
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Windowed SINC implementation.");
|
2015-03-20 18:57:16 +00:00
|
|
|
else if (!strcmp(settings->audio.resampler, "CC"))
|
2014-10-06 20:15:10 +00:00
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Convoluted Cosine implementation.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_driver"))
|
|
|
|
{
|
2015-03-20 18:57:16 +00:00
|
|
|
if (!strcmp(settings->video.driver, "gl"))
|
2014-07-27 02:30:06 +00:00
|
|
|
snprintf(msg, sizeof_msg,
|
2014-10-06 20:15:10 +00:00
|
|
|
" -- OpenGL Video driver. \n"
|
2014-07-27 02:30:06 +00:00
|
|
|
" \n"
|
2014-10-06 20:15:10 +00:00
|
|
|
"This driver allows libretro GL cores to \n"
|
|
|
|
"be used in addition to software-rendered \n"
|
|
|
|
"core implementations.\n"
|
2014-07-27 02:30:06 +00:00
|
|
|
" \n"
|
2014-10-06 20:15:10 +00:00
|
|
|
"Performance for software-rendered and \n"
|
|
|
|
"libretro GL core implementations is \n"
|
|
|
|
"dependent on your graphics card's \n"
|
|
|
|
"underlying GL driver).");
|
2015-03-20 18:57:16 +00:00
|
|
|
else if (!strcmp(settings->video.driver, "sdl2"))
|
2014-07-27 02:37:01 +00:00
|
|
|
snprintf(msg, sizeof_msg,
|
2014-10-06 20:15:10 +00:00
|
|
|
" -- SDL 2 Video driver.\n"
|
|
|
|
" \n"
|
|
|
|
"This is an SDL 2 software-rendered video \n"
|
|
|
|
"driver.\n"
|
2014-07-27 03:53:10 +00:00
|
|
|
" \n"
|
2014-10-06 20:15:10 +00:00
|
|
|
"Performance for software-rendered libretro \n"
|
|
|
|
"core implementations is dependent \n"
|
|
|
|
"on your platform SDL implementation.");
|
2015-03-20 18:57:16 +00:00
|
|
|
else if (!strcmp(settings->video.driver, "sdl"))
|
2014-07-27 03:53:10 +00:00
|
|
|
snprintf(msg, sizeof_msg,
|
2014-10-06 20:15:10 +00:00
|
|
|
" -- SDL Video driver.\n"
|
|
|
|
" \n"
|
|
|
|
"This is an SDL 1.2 software-rendered video \n"
|
|
|
|
"driver.\n"
|
|
|
|
" \n"
|
|
|
|
"Performance is considered to be suboptimal. \n"
|
|
|
|
"Consider using it only as a last resort.");
|
2015-03-20 18:57:16 +00:00
|
|
|
else if (!strcmp(settings->video.driver, "d3d"))
|
2014-07-27 03:53:10 +00:00
|
|
|
snprintf(msg, sizeof_msg,
|
2014-10-06 20:15:10 +00:00
|
|
|
" -- Direct3D Video driver. \n"
|
2014-07-27 03:53:10 +00:00
|
|
|
" \n"
|
2014-10-06 20:15:10 +00:00
|
|
|
"Performance for software-rendered cores \n"
|
|
|
|
"is dependent on your graphic card's \n"
|
|
|
|
"underlying D3D driver).");
|
2015-03-20 18:57:16 +00:00
|
|
|
else if (!strcmp(settings->video.driver, "exynos"))
|
2014-07-27 03:53:10 +00:00
|
|
|
snprintf(msg, sizeof_msg,
|
2014-10-06 20:15:10 +00:00
|
|
|
" -- Exynos-G2D Video Driver. \n"
|
2014-07-27 03:53:10 +00:00
|
|
|
" \n"
|
2014-10-06 20:15:10 +00:00
|
|
|
"This is a low-level Exynos video driver. \n"
|
|
|
|
"Uses the G2D block in Samsung Exynos SoC \n"
|
|
|
|
"for blit operations. \n"
|
2014-07-27 03:53:10 +00:00
|
|
|
" \n"
|
2014-10-06 20:15:10 +00:00
|
|
|
"Performance for software rendered cores \n"
|
|
|
|
"should be optimal.");
|
2015-03-20 18:57:16 +00:00
|
|
|
else if (!strcmp(settings->video.driver, "sunxi"))
|
2016-01-10 11:04:32 +00:00
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Sunxi-G2D Video Driver. \n"
|
|
|
|
" \n"
|
|
|
|
"This is a low-level Sunxi video driver. \n"
|
|
|
|
"Uses the G2D block in Allwinner SoCs.");
|
2014-10-06 20:15:10 +00:00
|
|
|
else
|
2014-08-28 18:54:42 +00:00
|
|
|
snprintf(msg, sizeof_msg,
|
2014-10-06 20:15:10 +00:00
|
|
|
" -- Current Video driver.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "audio_dsp_plugin"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Audio DSP plugin.\n"
|
|
|
|
" Processes audio before it's sent to \n"
|
|
|
|
"the driver."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "libretro_dir_path"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Core Directory. \n"
|
|
|
|
" \n"
|
|
|
|
"A directory for where to search for \n"
|
|
|
|
"libretro core implementations.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_disable_composition"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
"-- Forcibly disable composition.\n"
|
|
|
|
"Only valid on Windows Vista/7 for now.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "libretro_log_level"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
"-- Sets log level for libretro cores \n"
|
|
|
|
"(GET_LOG_INTERFACE). \n"
|
|
|
|
" \n"
|
|
|
|
" If a log level issued by a libretro \n"
|
|
|
|
" core is below libretro_log level, it \n"
|
|
|
|
" is ignored.\n"
|
|
|
|
" \n"
|
|
|
|
" DEBUG logs are always ignored unless \n"
|
|
|
|
" verbose mode is activated (--verbose).\n"
|
|
|
|
" \n"
|
|
|
|
" DEBUG = 0\n"
|
|
|
|
" INFO = 1\n"
|
|
|
|
" WARN = 2\n"
|
|
|
|
" ERROR = 3"
|
|
|
|
);
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "log_verbosity"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
"-- Enable or disable verbosity level \n"
|
|
|
|
"of frontend.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "perfcnt_enable"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
"-- Enable or disable frontend \n"
|
|
|
|
"performance counters.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "system_directory"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
"-- System Directory. \n"
|
|
|
|
" \n"
|
|
|
|
"Sets the 'system' directory.\n"
|
|
|
|
"Implementations can query for this\n"
|
|
|
|
"directory to load BIOSes, \n"
|
|
|
|
"system-specific configs, etc.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "rgui_show_start_screen"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Show startup screen in menu.\n"
|
|
|
|
"Is automatically set to false when seen\n"
|
|
|
|
"for the first time.\n"
|
|
|
|
" \n"
|
|
|
|
"This is only updated in config if\n"
|
|
|
|
"'Config Save On Exit' is set to true.\n");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "config_save_on_exit"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Flushes config to disk on exit.\n"
|
|
|
|
"Useful for menu as settings can be\n"
|
|
|
|
"modified. Overwrites the config.\n"
|
|
|
|
" \n"
|
|
|
|
"#include's and comments are not \n"
|
|
|
|
"preserved. \n"
|
|
|
|
" \n"
|
|
|
|
"By design, the config file is \n"
|
|
|
|
"considered immutable as it is \n"
|
|
|
|
"likely maintained by the user, \n"
|
|
|
|
"and should not be overwritten \n"
|
|
|
|
"behind the user's back."
|
|
|
|
#if defined(RARCH_CONSOLE) || defined(RARCH_MOBILE)
|
|
|
|
"\nThis is not not the case on \n"
|
|
|
|
"consoles however, where \n"
|
|
|
|
"looking at the config file \n"
|
|
|
|
"manually isn't really an option."
|
|
|
|
#endif
|
|
|
|
);
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "core_specific_config"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Load up a specific config file \n"
|
|
|
|
"based on the core being used.\n");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_scale"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Fullscreen resolution.\n"
|
|
|
|
" \n"
|
|
|
|
"Resolution of 0 uses the \n"
|
|
|
|
"resolution of the environment.\n");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_vsync"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Video V-Sync.\n");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_hard_sync"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Attempts to hard-synchronize \n"
|
|
|
|
"CPU and GPU.\n"
|
|
|
|
" \n"
|
|
|
|
"Can reduce latency at cost of \n"
|
|
|
|
"performance.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_hard_sync_frames"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Sets how many frames CPU can \n"
|
|
|
|
"run ahead of GPU when using 'GPU \n"
|
|
|
|
"Hard Sync'.\n"
|
|
|
|
" \n"
|
|
|
|
"Maximum is 3.\n"
|
|
|
|
" \n"
|
|
|
|
" 0: Syncs to GPU immediately.\n"
|
|
|
|
" 1: Syncs to previous frame.\n"
|
|
|
|
" 2: Etc ...");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_frame_delay"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Sets how many milliseconds to delay\n"
|
|
|
|
"after VSync before running the core.\n"
|
|
|
|
"\n"
|
|
|
|
"Can reduce latency at cost of\n"
|
|
|
|
"higher risk of stuttering.\n"
|
|
|
|
" \n"
|
|
|
|
"Maximum is 15.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "audio_rate_control_delta"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Audio rate control.\n"
|
|
|
|
" \n"
|
|
|
|
"Setting this to 0 disables rate control.\n"
|
|
|
|
"Any other value controls audio rate control \n"
|
|
|
|
"delta.\n"
|
|
|
|
" \n"
|
|
|
|
"Defines how much input rate can be adjusted \n"
|
|
|
|
"dynamically.\n"
|
|
|
|
" \n"
|
|
|
|
" Input rate is defined as: \n"
|
|
|
|
" input rate * (1.0 +/- (rate control delta))");
|
|
|
|
}
|
2014-11-16 14:24:58 +00:00
|
|
|
else if (!strcmp(label, "audio_max_timing_skew"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Maximum audio timing skew.\n"
|
|
|
|
" \n"
|
|
|
|
"Defines the maximum change in input rate.\n"
|
|
|
|
"You may want to increase this to enable\n"
|
|
|
|
"very large changes in timing, for example\n"
|
|
|
|
"running PAL cores on NTSC displays, at the\n"
|
|
|
|
"cost of inaccurate audio pitch.\n"
|
|
|
|
" \n"
|
|
|
|
" Input rate is defined as: \n"
|
|
|
|
" input rate * (1.0 +/- (max timing skew))");
|
|
|
|
}
|
2014-10-06 20:15:10 +00:00
|
|
|
else if (!strcmp(label, "video_filter"))
|
|
|
|
{
|
2014-08-16 08:06:49 +00:00
|
|
|
#ifdef HAVE_FILTERS_BUILTIN
|
2014-10-06 20:15:10 +00:00
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- CPU-based video filter.");
|
2014-08-16 08:06:49 +00:00
|
|
|
#else
|
2014-10-06 20:15:10 +00:00
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- CPU-based video filter.\n"
|
|
|
|
" \n"
|
|
|
|
"Path to a dynamic library.");
|
2014-08-16 08:06:49 +00:00
|
|
|
#endif
|
2014-10-06 20:15:10 +00:00
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_fullscreen"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg, " -- Toggles fullscreen.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "audio_device"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Override the default audio device \n"
|
|
|
|
"the audio driver uses.\n"
|
|
|
|
"This is driver dependent. E.g.\n"
|
2014-08-16 08:06:49 +00:00
|
|
|
#ifdef HAVE_ALSA
|
2014-10-06 20:15:10 +00:00
|
|
|
" \n"
|
|
|
|
"ALSA wants a PCM device."
|
2014-08-16 08:06:49 +00:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_OSS
|
2014-10-06 20:15:10 +00:00
|
|
|
" \n"
|
|
|
|
"OSS wants a path (e.g. /dev/dsp)."
|
2014-08-16 08:06:49 +00:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_JACK
|
2014-10-06 20:15:10 +00:00
|
|
|
" \n"
|
|
|
|
"JACK wants portnames (e.g. system:playback1\n"
|
|
|
|
",system:playback_2)."
|
2014-08-16 08:06:49 +00:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_RSOUND
|
2014-10-06 20:15:10 +00:00
|
|
|
" \n"
|
|
|
|
"RSound wants an IP address to an RSound \n"
|
|
|
|
"server."
|
2014-08-16 08:06:49 +00:00
|
|
|
#endif
|
2014-10-06 20:15:10 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_black_frame_insertion"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Inserts a black frame inbetween \n"
|
|
|
|
"frames.\n"
|
|
|
|
" \n"
|
|
|
|
"Useful for 120 Hz monitors who want to \n"
|
|
|
|
"play 60 Hz material with eliminated \n"
|
|
|
|
"ghosting.\n"
|
|
|
|
" \n"
|
|
|
|
"Video refresh rate should still be \n"
|
|
|
|
"configured as if it is a 60 Hz monitor \n"
|
|
|
|
"(divide refresh rate by 2).");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_threaded"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Use threaded video driver.\n"
|
|
|
|
" \n"
|
|
|
|
"Using this might improve performance at \n"
|
|
|
|
"possible cost of latency and more video \n"
|
|
|
|
"stuttering.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_scale_integer"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Only scales video in integer \n"
|
|
|
|
"steps.\n"
|
|
|
|
" \n"
|
|
|
|
"The base size depends on system-reported \n"
|
|
|
|
"geometry and aspect ratio.\n"
|
|
|
|
" \n"
|
|
|
|
"If Force Aspect is not set, X/Y will be \n"
|
|
|
|
"integer scaled independently.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_crop_overscan"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Forces cropping of overscanned \n"
|
|
|
|
"frames.\n"
|
|
|
|
" \n"
|
|
|
|
"Exact behavior of this option is \n"
|
|
|
|
"core-implementation specific.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_monitor_index"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Which monitor to prefer.\n"
|
|
|
|
" \n"
|
|
|
|
"0 (default) means no particular monitor \n"
|
|
|
|
"is preferred, 1 and up (1 being first \n"
|
|
|
|
"monitor), suggests RetroArch to use that \n"
|
|
|
|
"particular monitor.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_rotation"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Forces a certain rotation \n"
|
|
|
|
"of the screen.\n"
|
|
|
|
" \n"
|
|
|
|
"The rotation is added to rotations which\n"
|
|
|
|
"the libretro core sets (see Video Allow\n"
|
|
|
|
"Rotate).");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "audio_volume"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Audio volume, expressed in dB.\n"
|
|
|
|
" \n"
|
|
|
|
" 0 dB is normal volume. No gain will be applied.\n"
|
|
|
|
"Gain can be controlled in runtime with Input\n"
|
|
|
|
"Volume Up / Input Volume Down.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "block_sram_overwrite"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Block SRAM from being overwritten \n"
|
|
|
|
"when loading save states.\n"
|
|
|
|
" \n"
|
|
|
|
"Might potentially lead to buggy games.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "fastforward_ratio"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Fastforward ratio."
|
|
|
|
" \n"
|
|
|
|
"The maximum rate at which content will\n"
|
|
|
|
"be run when using fast forward.\n"
|
|
|
|
" \n"
|
|
|
|
" (E.g. 5.0 for 60 fps content => 300 fps \n"
|
|
|
|
"cap).\n"
|
|
|
|
" \n"
|
|
|
|
"RetroArch will go to sleep to ensure that \n"
|
|
|
|
"the maximum rate will not be exceeded.\n"
|
|
|
|
"Do not rely on this cap to be perfectly \n"
|
|
|
|
"accurate.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "pause_nonactive"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Pause gameplay when window focus \n"
|
|
|
|
"is lost.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_gpu_screenshot"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Screenshots output of GPU shaded \n"
|
|
|
|
"material if available.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "autosave_interval"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Autosaves the non-volatile SRAM \n"
|
|
|
|
"at a regular interval.\n"
|
|
|
|
" \n"
|
|
|
|
"This is disabled by default unless set \n"
|
|
|
|
"otherwise. The interval is measured in \n"
|
|
|
|
"seconds. \n"
|
|
|
|
" \n"
|
|
|
|
"A value of 0 disables autosave.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "screenshot_directory"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Screenshot Directory. \n"
|
|
|
|
" \n"
|
|
|
|
"Directory to dump screenshots to."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_swap_interval"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- VSync Swap Interval.\n"
|
|
|
|
" \n"
|
|
|
|
"Uses a custom swap interval for VSync. Set this \n"
|
|
|
|
"to effectively halve monitor refresh rate.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_refresh_rate_auto"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Refresh Rate Auto.\n"
|
|
|
|
" \n"
|
|
|
|
"The accurate refresh rate of our monitor (Hz).\n"
|
|
|
|
"This is used to calculate audio input rate with \n"
|
|
|
|
"the formula: \n"
|
|
|
|
" \n"
|
|
|
|
"audio_input_rate = game input rate * display \n"
|
|
|
|
"refresh rate / game refresh rate\n"
|
|
|
|
" \n"
|
|
|
|
"If the implementation does not report any \n"
|
|
|
|
"values, NTSC defaults will be assumed for \n"
|
|
|
|
"compatibility.\n"
|
|
|
|
" \n"
|
|
|
|
"This value should stay close to 60Hz to avoid \n"
|
|
|
|
"large pitch changes. If your monitor does \n"
|
|
|
|
"not run at 60Hz, or something close to it, \n"
|
|
|
|
"disable VSync, and leave this at its default.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "savefile_directory"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Savefile Directory. \n"
|
|
|
|
" \n"
|
|
|
|
"Save all save files (*.srm) to this \n"
|
|
|
|
"directory. This includes related files like \n"
|
|
|
|
".bsv, .rt, .psrm, etc...\n"
|
|
|
|
" \n"
|
|
|
|
"This will be overridden by explicit command line\n"
|
|
|
|
"options.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "savestate_directory"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Savestate Directory. \n"
|
|
|
|
" \n"
|
|
|
|
"Save all save states (*.state) to this \n"
|
|
|
|
"directory.\n"
|
|
|
|
" \n"
|
|
|
|
"This will be overridden by explicit command line\n"
|
|
|
|
"options.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "assets_directory"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Assets Directory. \n"
|
|
|
|
" \n"
|
|
|
|
" This location is queried by default when \n"
|
|
|
|
"menu interfaces try to look for loadable \n"
|
|
|
|
"assets, etc.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "slowmotion_ratio"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Slowmotion ratio."
|
|
|
|
" \n"
|
|
|
|
"When slowmotion, content will slow\n"
|
|
|
|
"down by factor.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "input_axis_threshold"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Defines axis threshold.\n"
|
|
|
|
" \n"
|
|
|
|
"How far an axis must be tilted to result\n"
|
|
|
|
"in a button press.\n"
|
|
|
|
" Possible values are [0.0, 1.0].");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "input_turbo_period"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Turbo period.\n"
|
|
|
|
" \n"
|
|
|
|
"Describes speed of which turbo-enabled\n"
|
|
|
|
"buttons toggle."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "rewind_granularity"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Rewind granularity.\n"
|
|
|
|
" \n"
|
|
|
|
" When rewinding defined number of \n"
|
|
|
|
"frames, you can rewind several frames \n"
|
|
|
|
"at a time, increasing the rewinding \n"
|
|
|
|
"speed.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "rewind_enable"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Enable rewinding.\n"
|
|
|
|
" \n"
|
|
|
|
"This will take a performance hit, \n"
|
|
|
|
"so it is disabled by default.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "input_autodetect_enable"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Enable input auto-detection.\n"
|
|
|
|
" \n"
|
|
|
|
"Will attempt to auto-configure \n"
|
|
|
|
"joypads, Plug-and-Play style.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "camera_allow"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Allow or disallow camera access by \n"
|
|
|
|
"cores.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "location_allow"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Allow or disallow location services \n"
|
|
|
|
"access by cores.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "savestate_auto_save"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Automatically saves a savestate at the \n"
|
|
|
|
"end of RetroArch's lifetime.\n"
|
|
|
|
" \n"
|
|
|
|
"RetroArch will automatically load any savestate\n"
|
|
|
|
"with this path on startup if 'Savestate Auto\n"
|
|
|
|
"Load' is set.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "shader_apply_changes"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Apply Shader Changes. \n"
|
|
|
|
" \n"
|
|
|
|
"After changing shader settings, use this to \n"
|
|
|
|
"apply changes. \n"
|
|
|
|
" \n"
|
|
|
|
"Changing shader settings is a somewhat \n"
|
|
|
|
"expensive operation so it has to be \n"
|
|
|
|
"done explicitly. \n"
|
|
|
|
" \n"
|
|
|
|
"When you apply shaders, the menu shader \n"
|
|
|
|
"settings are saved to a temporary file (either \n"
|
|
|
|
"menu.cgp or menu.glslp) and loaded. The file \n"
|
|
|
|
"persists after RetroArch exits. The file is \n"
|
|
|
|
"saved to Shader Directory."
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_shader_preset"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Load Shader Preset. \n"
|
|
|
|
" \n"
|
|
|
|
" Load a "
|
2014-09-05 02:21:46 +00:00
|
|
|
#ifdef HAVE_CG
|
2014-10-06 20:15:10 +00:00
|
|
|
"Cg"
|
2014-09-05 02:21:46 +00:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_GLSL
|
|
|
|
#ifdef HAVE_CG
|
2014-10-06 20:15:10 +00:00
|
|
|
"/"
|
2014-09-05 02:21:46 +00:00
|
|
|
#endif
|
2014-10-06 20:15:10 +00:00
|
|
|
"GLSL"
|
2014-09-05 02:21:46 +00:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_HLSL
|
|
|
|
#if defined(HAVE_CG) || defined(HAVE_HLSL)
|
2014-10-06 20:15:10 +00:00
|
|
|
"/"
|
2014-09-05 02:21:46 +00:00
|
|
|
#endif
|
2014-10-06 20:15:10 +00:00
|
|
|
"HLSL"
|
2014-09-05 02:21:46 +00:00
|
|
|
#endif
|
2014-10-06 20:15:10 +00:00
|
|
|
" preset directly. \n"
|
|
|
|
"The menu shader menu is updated accordingly. \n"
|
|
|
|
" \n"
|
|
|
|
"If the CGP uses scaling methods which are not \n"
|
|
|
|
"simple, (i.e. source scaling, same scaling \n"
|
|
|
|
"factor for X/Y), the scaling factor displayed \n"
|
|
|
|
"in the menu might not be correct."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_shader_num_passes"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Shader Passes. \n"
|
|
|
|
" \n"
|
|
|
|
"RetroArch allows you to mix and match various \n"
|
|
|
|
"shaders with arbitrary shader passes, with \n"
|
|
|
|
"custom hardware filters and scale factors. \n"
|
|
|
|
" \n"
|
|
|
|
"This option specifies the number of shader \n"
|
|
|
|
"passes to use. If you set this to 0, and use \n"
|
|
|
|
"Apply Shader Changes, you use a 'blank' shader. \n"
|
|
|
|
" \n"
|
|
|
|
"The Default Filter option will affect the \n"
|
|
|
|
"stretching filter.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_shader_parameters"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
"-- Shader Parameters. \n"
|
|
|
|
" \n"
|
|
|
|
"Modifies current shader directly. Will not be \n"
|
|
|
|
"saved to CGP/GLSLP preset file.");
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_shader_preset_parameters"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
"-- Shader Preset Parameters. \n"
|
|
|
|
" \n"
|
|
|
|
"Modifies shader preset currently in menu."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_shader_pass"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Path to shader. \n"
|
|
|
|
" \n"
|
|
|
|
"All shaders must be of the same \n"
|
|
|
|
"type (i.e. CG, GLSL or HLSL). \n"
|
|
|
|
" \n"
|
|
|
|
"Set Shader Directory to set where \n"
|
|
|
|
"the browser starts to look for \n"
|
|
|
|
"shaders."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_shader_filter_pass"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Hardware filter for this pass. \n"
|
|
|
|
" \n"
|
|
|
|
"If 'Don't Care' is set, 'Default \n"
|
|
|
|
"Filter' will be used."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
else if (!strcmp(label, "video_shader_scale_pass"))
|
|
|
|
{
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Scale for this pass. \n"
|
|
|
|
" \n"
|
|
|
|
"The scale factor accumulates, i.e. 2x \n"
|
|
|
|
"for first pass and 2x for second pass \n"
|
|
|
|
"will give you a 4x total scale. \n"
|
|
|
|
" \n"
|
|
|
|
"If there is a scale factor for last \n"
|
|
|
|
"pass, the result is stretched to \n"
|
|
|
|
"screen with the filter specified in \n"
|
|
|
|
"'Default Filter'. \n"
|
|
|
|
" \n"
|
|
|
|
"If 'Don't Care' is set, either 1x \n"
|
|
|
|
"scale or stretch to fullscreen will \n"
|
|
|
|
"be used depending if it's not the last \n"
|
|
|
|
"pass or not."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
else if (
|
|
|
|
!strcmp(label, "l_x_plus") ||
|
|
|
|
!strcmp(label, "l_x_minus") ||
|
|
|
|
!strcmp(label, "l_y_plus") ||
|
|
|
|
!strcmp(label, "l_y_minus")
|
|
|
|
)
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Axis for analog stick (DualShock-esque).\n"
|
|
|
|
" \n"
|
|
|
|
"Bound as usual, however, if a real analog \n"
|
|
|
|
"axis is bound, it can be read as a true analog.\n"
|
|
|
|
" \n"
|
|
|
|
"Positive X axis is right. \n"
|
|
|
|
"Positive Y axis is down.");
|
|
|
|
else if (!strcmp(label, "turbo"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Turbo enable.\n"
|
|
|
|
" \n"
|
|
|
|
"Holding the turbo while pressing another \n"
|
|
|
|
"button will let the button enter a turbo \n"
|
|
|
|
"mode where the button state is modulated \n"
|
|
|
|
"with a periodic signal. \n"
|
|
|
|
" \n"
|
|
|
|
"The modulation stops when the button \n"
|
|
|
|
"itself (not turbo button) is released.");
|
|
|
|
else if (!strcmp(label, "exit_emulator"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Key to exit RetroArch cleanly."
|
2014-09-08 04:12:43 +00:00
|
|
|
#if !defined(RARCH_MOBILE) && !defined(RARCH_CONSOLE)
|
2014-10-06 20:15:10 +00:00
|
|
|
"\nKilling it in any hard way (SIGKILL, \n"
|
|
|
|
"etc) will terminate without saving\n"
|
|
|
|
"RAM, etc. On Unix-likes,\n"
|
|
|
|
"SIGINT/SIGTERM allows\n"
|
|
|
|
"a clean deinitialization."
|
2014-09-08 04:12:43 +00:00
|
|
|
#endif
|
2014-10-06 20:15:10 +00:00
|
|
|
);
|
|
|
|
else if (!strcmp(label, "rewind"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Hold button down to rewind.\n"
|
|
|
|
" \n"
|
|
|
|
"Rewind must be enabled.");
|
|
|
|
else if (!strcmp(label, "load_state"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Loads state.");
|
|
|
|
else if (!strcmp(label, "save_state"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Saves state.");
|
|
|
|
else if (!strcmp(label, "state_slot_increase") ||
|
|
|
|
!strcmp(label, "state_slot_decrease"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- State slots.\n"
|
|
|
|
" \n"
|
|
|
|
" With slot set to 0, save state name is *.state \n"
|
|
|
|
" (or whatever defined on commandline).\n"
|
|
|
|
"When slot is != 0, path will be (path)(d), \n"
|
|
|
|
"where (d) is slot number.");
|
|
|
|
else if (!strcmp(label, "netplay_flip_players"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
2014-12-05 12:48:54 +00:00
|
|
|
" -- Netplay flip users.");
|
2014-10-06 20:15:10 +00:00
|
|
|
else if (!strcmp(label, "frame_advance"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Frame advance when content is paused.");
|
|
|
|
else if (!strcmp(label, "enable_hotkey"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Enable other hotkeys.\n"
|
|
|
|
" \n"
|
|
|
|
" If this hotkey is bound to either keyboard, \n"
|
|
|
|
"joybutton or joyaxis, all other hotkeys will \n"
|
|
|
|
"be disabled unless this hotkey is also held \n"
|
|
|
|
"at the same time. \n"
|
|
|
|
" \n"
|
|
|
|
"This is useful for RETRO_KEYBOARD centric \n"
|
|
|
|
"implementations which query a large area of \n"
|
|
|
|
"the keyboard, where it is not desirable that \n"
|
|
|
|
"hotkeys get in the way.");
|
|
|
|
else if (!strcmp(label, "slowmotion"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Hold for slowmotion.");
|
|
|
|
else if (!strcmp(label, "movie_record_toggle"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Toggle between recording and not.");
|
|
|
|
else if (!strcmp(label, "pause_toggle"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Toggle between paused and non-paused state.");
|
|
|
|
else if (!strcmp(label, "hold_fast_forward"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Hold for fast-forward. Releasing button \n"
|
|
|
|
"disables fast-forward.");
|
|
|
|
else if (!strcmp(label, "shader_next"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Applies next shader in directory.");
|
|
|
|
else if (!strcmp(label, "reset"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Reset the content.\n");
|
|
|
|
else if (!strcmp(label, "cheat_index_plus"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Increment cheat index.\n");
|
|
|
|
else if (!strcmp(label, "cheat_index_minus"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Decrement cheat index.\n");
|
|
|
|
else if (!strcmp(label, "cheat_toggle"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Toggle cheat index.\n");
|
|
|
|
else if (!strcmp(label, "shader_prev"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Applies previous shader in directory.");
|
|
|
|
else if (!strcmp(label, "audio_mute"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Mute/unmute audio.");
|
2015-03-26 03:24:12 +00:00
|
|
|
else if (!strcmp(label, "osk_enable"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Enable/disable on-screen keyboard.");
|
2014-10-06 20:15:10 +00:00
|
|
|
else if (!strcmp(label, "screenshot"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Take screenshot.");
|
|
|
|
else if (!strcmp(label, "volume_up"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Increases audio volume.");
|
|
|
|
else if (!strcmp(label, "volume_down"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Decreases audio volume.");
|
|
|
|
else if (!strcmp(label, "overlay_next"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Toggles to next overlay.\n"
|
|
|
|
" \n"
|
|
|
|
"Wraps around.");
|
|
|
|
else if (!strcmp(label, "disk_eject_toggle"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Toggles eject for disks.\n"
|
|
|
|
" \n"
|
|
|
|
"Used for multiple-disk content.");
|
|
|
|
else if (!strcmp(label, "disk_next"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Cycles through disk images. Use after \n"
|
|
|
|
"ejecting. \n"
|
|
|
|
" \n"
|
|
|
|
" Complete by toggling eject again.");
|
|
|
|
else if (!strcmp(label, "grab_mouse_toggle"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Toggles mouse grab.\n"
|
|
|
|
" \n"
|
|
|
|
"When mouse is grabbed, RetroArch hides the \n"
|
|
|
|
"mouse, and keeps the mouse pointer inside \n"
|
|
|
|
"the window to allow relative mouse input to \n"
|
|
|
|
"work better.");
|
|
|
|
else if (!strcmp(label, "menu_toggle"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Toggles menu.");
|
|
|
|
else if (!strcmp(label, "input_bind_device_id"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Input Device. \n"
|
|
|
|
" \n"
|
2014-12-05 12:48:54 +00:00
|
|
|
"Picks which gamepad to use for user N. \n"
|
2014-10-06 20:15:10 +00:00
|
|
|
"The name of the pad is available."
|
|
|
|
);
|
|
|
|
else if (!strcmp(label, "input_bind_device_type"))
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
" -- Input Device Type. \n"
|
|
|
|
" \n"
|
|
|
|
"Picks which device type to use. This is \n"
|
|
|
|
"relevant for the libretro core itself."
|
|
|
|
);
|
|
|
|
else
|
|
|
|
snprintf(msg, sizeof_msg,
|
|
|
|
"-- No info on this item is available. --\n");
|
|
|
|
|
|
|
|
return 0;
|
2014-07-27 02:30:06 +00:00
|
|
|
}
|
|
|
|
|
2014-09-28 16:01:59 +00:00
|
|
|
#ifdef HAVE_MENU
|
2014-10-24 07:16:50 +00:00
|
|
|
static void get_string_representation_bind_device(void * data, char *type_str,
|
|
|
|
size_t type_str_size)
|
|
|
|
{
|
|
|
|
unsigned map = 0;
|
2015-03-20 18:57:16 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
settings_t *settings = config_get_ptr();
|
2014-10-24 07:16:50 +00:00
|
|
|
|
2015-02-01 12:17:19 +00:00
|
|
|
if (!setting)
|
2014-10-24 07:16:50 +00:00
|
|
|
return;
|
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
map = settings->input.joypad_map[setting->index_offset];
|
2014-10-24 07:16:50 +00:00
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
if (map < settings->input.max_users)
|
2014-10-24 07:16:50 +00:00
|
|
|
{
|
2015-03-20 18:57:16 +00:00
|
|
|
const char *device_name = settings->input.device_names[map];
|
2014-10-24 07:16:50 +00:00
|
|
|
|
|
|
|
if (*device_name)
|
|
|
|
strlcpy(type_str, device_name, type_str_size);
|
|
|
|
else
|
|
|
|
snprintf(type_str, type_str_size,
|
|
|
|
"N/A (port #%d)", map);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
strlcpy(type_str, "Disabled", type_str_size);
|
|
|
|
}
|
|
|
|
|
2015-01-30 09:35:06 +00:00
|
|
|
|
2014-10-22 23:53:24 +00:00
|
|
|
static void get_string_representation_savestate(void * data, char *type_str,
|
|
|
|
size_t type_str_size)
|
|
|
|
{
|
2015-03-20 18:57:16 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
|
|
|
snprintf(type_str, type_str_size, "%d", settings->state_slot);
|
|
|
|
if (settings->state_slot == -1)
|
2014-10-22 23:53:24 +00:00
|
|
|
strlcat(type_str, " (Auto)", type_str_size);
|
|
|
|
}
|
|
|
|
|
2015-01-09 15:45:58 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_get_label:
|
2015-01-26 21:00:59 +00:00
|
|
|
* @list : File list on which to perform the search
|
2015-01-09 15:45:58 +00:00
|
|
|
* @type_str : String for the type to be represented on-screen as
|
|
|
|
* a label.
|
|
|
|
* @type_str_size : Size of @type_str
|
|
|
|
* @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-03-20 23:56:26 +00:00
|
|
|
void setting_get_label(file_list_t *list, char *type_str,
|
2014-09-07 04:00:41 +00:00
|
|
|
size_t type_str_size, unsigned *w, unsigned type,
|
2014-10-20 02:35:02 +00:00
|
|
|
const char *menu_label, const char *label, unsigned idx)
|
2014-09-07 04:00:41 +00:00
|
|
|
{
|
2015-02-01 12:14:07 +00:00
|
|
|
rarch_setting_t *setting_data = NULL;
|
|
|
|
rarch_setting_t *setting = NULL;
|
2015-03-21 22:56:42 +00:00
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
2015-02-01 12:14:07 +00:00
|
|
|
|
2015-02-13 22:41:34 +00:00
|
|
|
if (!menu || !menu->menu_list || !label)
|
2014-10-17 23:17:00 +00:00
|
|
|
return;
|
|
|
|
|
2015-02-13 22:41:34 +00:00
|
|
|
setting_data = (rarch_setting_t*)menu->list_settings;
|
2015-02-01 12:15:41 +00:00
|
|
|
|
|
|
|
if (!setting_data)
|
|
|
|
return;
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
setting = (rarch_setting_t*)setting_find_setting(setting_data,
|
2015-02-03 03:24:34 +00:00
|
|
|
list->list[idx].label);
|
2014-11-29 20:03:31 +00:00
|
|
|
|
2015-02-01 12:17:38 +00:00
|
|
|
if (setting)
|
2015-03-20 23:56:26 +00:00
|
|
|
setting_get_string_representation(setting, type_str, type_str_size);
|
2014-09-07 04:00:41 +00:00
|
|
|
}
|
2014-09-28 16:01:59 +00:00
|
|
|
#endif
|
2014-09-07 04:00:41 +00:00
|
|
|
|
2014-09-14 21:44:14 +00:00
|
|
|
static void general_read_handler(void *data)
|
2014-07-25 23:50:47 +00:00
|
|
|
{
|
2015-03-20 18:57:16 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
|
|
|
settings_t *settings = config_get_ptr();
|
2014-10-06 20:15:10 +00:00
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (!strcmp(setting->name, "audio_rate_control_delta"))
|
|
|
|
{
|
2015-03-20 18:57:16 +00:00
|
|
|
*setting->value.fraction = settings->audio.rate_control_delta;
|
2014-10-06 20:15:10 +00:00
|
|
|
if (*setting->value.fraction < 0.0005)
|
|
|
|
{
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->audio.rate_control = false;
|
|
|
|
settings->audio.rate_control_delta = 0.0;
|
2014-10-06 20:15:10 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->audio.rate_control = true;
|
|
|
|
settings->audio.rate_control_delta = *setting->value.fraction;
|
2014-10-06 20:15:10 +00:00
|
|
|
}
|
|
|
|
}
|
2014-11-16 14:24:58 +00:00
|
|
|
else if (!strcmp(setting->name, "audio_max_timing_skew"))
|
2015-03-20 18:57:16 +00:00
|
|
|
*setting->value.fraction = settings->audio.max_timing_skew;
|
2014-10-06 20:15:10 +00:00
|
|
|
else if (!strcmp(setting->name, "video_refresh_rate_auto"))
|
2015-03-20 18:57:16 +00:00
|
|
|
*setting->value.fraction = settings->video.refresh_rate;
|
2014-10-06 20:15:10 +00:00
|
|
|
else if (!strcmp(setting->name, "input_player1_joypad_index"))
|
2015-03-20 18:57:16 +00:00
|
|
|
*setting->value.integer = settings->input.joypad_map[0];
|
2014-10-06 20:15:10 +00:00
|
|
|
else if (!strcmp(setting->name, "input_player2_joypad_index"))
|
2015-03-20 18:57:16 +00:00
|
|
|
*setting->value.integer = settings->input.joypad_map[1];
|
2014-10-06 20:15:10 +00:00
|
|
|
else if (!strcmp(setting->name, "input_player3_joypad_index"))
|
2015-03-20 18:57:16 +00:00
|
|
|
*setting->value.integer = settings->input.joypad_map[2];
|
2014-10-06 20:15:10 +00:00
|
|
|
else if (!strcmp(setting->name, "input_player4_joypad_index"))
|
2015-03-20 18:57:16 +00:00
|
|
|
*setting->value.integer = settings->input.joypad_map[3];
|
2014-10-06 20:15:10 +00:00
|
|
|
else if (!strcmp(setting->name, "input_player5_joypad_index"))
|
2015-03-20 18:57:16 +00:00
|
|
|
*setting->value.integer = settings->input.joypad_map[4];
|
2014-07-25 23:50:47 +00:00
|
|
|
}
|
|
|
|
|
2014-09-14 21:44:14 +00:00
|
|
|
static void general_write_handler(void *data)
|
2014-07-15 16:16:40 +00:00
|
|
|
{
|
2014-08-13 18:07:45 +00:00
|
|
|
unsigned rarch_cmd = RARCH_CMD_NONE;
|
2014-09-14 21:44:14 +00:00
|
|
|
rarch_setting_t *setting = (rarch_setting_t*)data;
|
2015-03-20 18:57:16 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
driver_t *driver = driver_get_ptr();
|
2015-03-21 04:42:49 +00:00
|
|
|
global_t *global = global_get_ptr();
|
2014-08-02 01:50:52 +00:00
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return;
|
|
|
|
|
2014-09-14 21:44:14 +00:00
|
|
|
if (setting->cmd_trigger.idx != RARCH_CMD_NONE)
|
2014-08-27 21:44:23 +00:00
|
|
|
{
|
2014-09-14 22:21:24 +00:00
|
|
|
if (setting->flags & SD_FLAG_EXIT)
|
|
|
|
{
|
|
|
|
if (*setting->value.boolean)
|
|
|
|
*setting->value.boolean = false;
|
|
|
|
}
|
|
|
|
if (setting->cmd_trigger.triggered ||
|
|
|
|
(setting->flags & SD_FLAG_CMD_APPLY_AUTO))
|
2014-09-14 21:44:14 +00:00
|
|
|
rarch_cmd = setting->cmd_trigger.idx;
|
2014-08-27 22:08:13 +00:00
|
|
|
}
|
2014-09-14 21:44:14 +00:00
|
|
|
|
|
|
|
if (!strcmp(setting->name, "help"))
|
2014-08-27 22:08:13 +00:00
|
|
|
{
|
2015-03-21 22:56:42 +00:00
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
2015-02-13 22:41:34 +00:00
|
|
|
|
|
|
|
if (!menu || !menu->menu_list)
|
2014-10-17 23:17:00 +00:00
|
|
|
return;
|
|
|
|
|
2014-08-27 22:08:13 +00:00
|
|
|
if (*setting->value.boolean)
|
|
|
|
{
|
|
|
|
#ifdef HAVE_MENU
|
2014-10-17 20:29:59 +00:00
|
|
|
menu_list_push_stack_refresh(
|
2015-02-13 22:41:34 +00:00
|
|
|
menu->menu_list,
|
2014-10-17 20:25:23 +00:00
|
|
|
"",
|
|
|
|
"help",
|
|
|
|
0,
|
|
|
|
0);
|
2014-08-27 22:08:13 +00:00
|
|
|
#endif
|
|
|
|
*setting->value.boolean = false;
|
|
|
|
}
|
|
|
|
}
|
2014-08-02 01:50:52 +00:00
|
|
|
else if (!strcmp(setting->name, "video_smooth"))
|
|
|
|
{
|
2015-03-22 23:39:42 +00:00
|
|
|
video_driver_set_filtering(1, settings->video.smooth);
|
2014-08-02 01:50:52 +00:00
|
|
|
}
|
2014-08-31 01:50:44 +00:00
|
|
|
else if (!strcmp(setting->name, "pal60_enable"))
|
|
|
|
{
|
2015-03-21 04:42:49 +00:00
|
|
|
if (*setting->value.boolean && global->console.screen.pal_enable)
|
2014-08-31 01:50:44 +00:00
|
|
|
rarch_cmd = RARCH_CMD_REINIT;
|
|
|
|
else
|
|
|
|
*setting->value.boolean = false;
|
|
|
|
}
|
2014-08-02 01:50:52 +00:00
|
|
|
else if (!strcmp(setting->name, "video_rotation"))
|
|
|
|
{
|
2015-03-22 09:38:26 +00:00
|
|
|
video_driver_set_rotation(
|
2014-09-03 18:31:41 +00:00
|
|
|
(*setting->value.unsigned_integer +
|
2015-03-21 04:42:49 +00:00
|
|
|
global->system.rotation) % 4);
|
2014-08-02 01:50:52 +00:00
|
|
|
}
|
2014-08-31 02:03:04 +00:00
|
|
|
else if (!strcmp(setting->name, "system_bgm_enable"))
|
|
|
|
{
|
|
|
|
if (*setting->value.boolean)
|
|
|
|
{
|
|
|
|
#if defined(__CELLOS_LV2__) && (CELL_SDK_VERSION > 0x340000)
|
|
|
|
cellSysutilEnableBgmPlayback();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
#if defined(__CELLOS_LV2__) && (CELL_SDK_VERSION > 0x340000)
|
|
|
|
cellSysutilDisableBgmPlayback();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
2014-08-02 01:50:52 +00:00
|
|
|
else if (!strcmp(setting->name, "audio_volume"))
|
2015-03-21 04:42:49 +00:00
|
|
|
global->audio_data.volume_gain = db_to_gain(*setting->value.fraction);
|
2014-10-08 05:01:46 +00:00
|
|
|
else if (!strcmp(setting->name, "audio_latency"))
|
|
|
|
rarch_cmd = RARCH_CMD_AUDIO_REINIT;
|
2014-08-02 01:50:52 +00:00
|
|
|
else if (!strcmp(setting->name, "audio_rate_control_delta"))
|
|
|
|
{
|
|
|
|
if (*setting->value.fraction < 0.0005)
|
|
|
|
{
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->audio.rate_control = false;
|
|
|
|
settings->audio.rate_control_delta = 0.0;
|
2014-08-02 01:50:52 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->audio.rate_control = true;
|
|
|
|
settings->audio.rate_control_delta = *setting->value.fraction;
|
2014-08-02 01:50:52 +00:00
|
|
|
}
|
|
|
|
}
|
2014-11-16 14:24:58 +00:00
|
|
|
else if (!strcmp(setting->name, "audio_max_timing_skew"))
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->audio.max_timing_skew = *setting->value.fraction;
|
2014-08-02 13:47:11 +00:00
|
|
|
else if (!strcmp(setting->name, "video_refresh_rate_auto"))
|
2014-08-02 01:50:52 +00:00
|
|
|
{
|
2015-03-18 18:40:00 +00:00
|
|
|
if (driver->video && driver->video_data)
|
2014-08-02 01:50:52 +00:00
|
|
|
{
|
2015-01-18 18:01:13 +00:00
|
|
|
driver_set_refresh_rate(*setting->value.fraction);
|
2014-08-15 18:51:59 +00:00
|
|
|
|
2014-08-02 01:50:52 +00:00
|
|
|
/* In case refresh rate update forced non-block video. */
|
2014-08-16 16:42:50 +00:00
|
|
|
rarch_cmd = RARCH_CMD_VIDEO_SET_BLOCKING_STATE;
|
2014-08-02 01:50:52 +00:00
|
|
|
}
|
|
|
|
}
|
2014-08-11 21:57:57 +00:00
|
|
|
else if (!strcmp(setting->name, "video_scale"))
|
2014-08-02 01:50:52 +00:00
|
|
|
{
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->video.scale = roundf(*setting->value.fraction);
|
2014-08-02 01:50:52 +00:00
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
if (!settings->video.fullscreen)
|
2014-08-13 18:07:45 +00:00
|
|
|
rarch_cmd = RARCH_CMD_REINIT;
|
2014-08-02 01:50:52 +00:00
|
|
|
}
|
|
|
|
else if (!strcmp(setting->name, "input_player1_joypad_index"))
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->input.joypad_map[0] = *setting->value.integer;
|
2014-08-02 01:50:52 +00:00
|
|
|
else if (!strcmp(setting->name, "input_player2_joypad_index"))
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->input.joypad_map[1] = *setting->value.integer;
|
2014-08-02 01:50:52 +00:00
|
|
|
else if (!strcmp(setting->name, "input_player3_joypad_index"))
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->input.joypad_map[2] = *setting->value.integer;
|
2014-08-02 01:50:52 +00:00
|
|
|
else if (!strcmp(setting->name, "input_player4_joypad_index"))
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->input.joypad_map[3] = *setting->value.integer;
|
2014-08-02 01:50:52 +00:00
|
|
|
else if (!strcmp(setting->name, "input_player5_joypad_index"))
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->input.joypad_map[4] = *setting->value.integer;
|
2014-07-17 22:33:01 +00:00
|
|
|
#ifdef HAVE_NETPLAY
|
2014-08-27 12:50:49 +00:00
|
|
|
else if (!strcmp(setting->name, "netplay_ip_address"))
|
2015-03-21 04:42:49 +00:00
|
|
|
global->has_set_netplay_ip_address = (setting->value.string[0] != '\0');
|
2014-08-02 01:50:52 +00:00
|
|
|
else if (!strcmp(setting->name, "netplay_mode"))
|
|
|
|
{
|
2015-03-21 04:42:49 +00:00
|
|
|
if (!global->netplay_is_client)
|
|
|
|
*global->netplay_server = '\0';
|
|
|
|
global->has_set_netplay_mode = true;
|
2014-08-02 01:50:52 +00:00
|
|
|
}
|
|
|
|
else if (!strcmp(setting->name, "netplay_spectator_mode_enable"))
|
|
|
|
{
|
2015-03-21 04:42:49 +00:00
|
|
|
if (global->netplay_is_spectate)
|
|
|
|
*global->netplay_server = '\0';
|
2014-08-02 01:50:52 +00:00
|
|
|
}
|
|
|
|
else if (!strcmp(setting->name, "netplay_delay_frames"))
|
2015-03-21 04:42:49 +00:00
|
|
|
global->has_set_netplay_delay_frames = (global->netplay_sync_frames > 0);
|
2014-07-17 22:33:01 +00:00
|
|
|
#endif
|
2014-08-02 01:50:52 +00:00
|
|
|
else if (!strcmp(setting->name, "log_verbosity"))
|
2014-08-30 01:28:57 +00:00
|
|
|
{
|
2015-03-21 04:42:49 +00:00
|
|
|
global->verbosity = *setting->value.boolean;
|
|
|
|
global->has_set_verbosity = *setting->value.boolean;
|
2014-08-30 01:28:57 +00:00
|
|
|
}
|
2014-08-02 01:50:52 +00:00
|
|
|
|
2014-09-14 21:44:14 +00:00
|
|
|
if (rarch_cmd || setting->cmd_trigger.triggered)
|
2014-08-13 18:07:45 +00:00
|
|
|
rarch_main_command(rarch_cmd);
|
2014-07-15 16:16:40 +00:00
|
|
|
}
|
|
|
|
|
2014-10-07 13:37:29 +00:00
|
|
|
#define START_GROUP(group_info, NAME) \
|
|
|
|
{ \
|
|
|
|
group_info.name = NAME; \
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!(settings_list_append(list, list_info, setting_group_setting (ST_GROUP, NAME)))) return false; \
|
2014-10-07 13:37:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#define END_GROUP(list, list_info) \
|
|
|
|
{ \
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!(settings_list_append(list, list_info, setting_group_setting (ST_END_GROUP, 0)))) return false; \
|
2014-10-07 13:37:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#define START_SUB_GROUP(list, list_info, NAME, group_info, subgroup_info) \
|
|
|
|
{ \
|
|
|
|
subgroup_info.name = NAME; \
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!(settings_list_append(list, list_info, setting_subgroup_setting (ST_SUB_GROUP, NAME, group_info)))) return false; \
|
2014-10-07 13:37:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#define END_SUB_GROUP(list, list_info) \
|
|
|
|
{ \
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!(settings_list_append(list, list_info, setting_group_setting (ST_END_SUB_GROUP, 0)))) return false; \
|
2014-10-07 13:37:29 +00:00
|
|
|
}
|
|
|
|
|
2014-10-22 22:51:11 +00:00
|
|
|
#define CONFIG_ACTION(NAME, SHORT, group_info, subgroup_info) \
|
2014-10-22 22:10:58 +00:00
|
|
|
{ \
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!settings_list_append(list, list_info, setting_action_setting (NAME, SHORT, group_info, subgroup_info))) return false; \
|
2014-10-22 22:10:58 +00:00
|
|
|
}
|
|
|
|
|
2014-10-07 13:37:29 +00:00
|
|
|
#define CONFIG_BOOL(TARGET, NAME, SHORT, DEF, OFF, ON, group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER) \
|
|
|
|
{ \
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!settings_list_append(list, list_info, setting_bool_setting (NAME, SHORT, &TARGET, DEF, OFF, ON, group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER)))return false; \
|
2014-10-07 13:37:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#define CONFIG_INT(TARGET, NAME, SHORT, DEF, group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER) \
|
|
|
|
{ \
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!(settings_list_append(list, list_info, setting_int_setting (NAME, SHORT, &TARGET, DEF, group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER)))) return false; \
|
2014-10-07 13:37:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#define CONFIG_UINT(TARGET, NAME, SHORT, DEF, group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER) \
|
|
|
|
{ \
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!(settings_list_append(list, list_info, setting_uint_setting (NAME, SHORT, &TARGET, DEF, group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER)))) return false; \
|
2014-10-07 13:37:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#define CONFIG_FLOAT(TARGET, NAME, SHORT, DEF, ROUNDING, group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER) \
|
|
|
|
{ \
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!(settings_list_append(list, list_info, setting_float_setting (NAME, SHORT, &TARGET, DEF, ROUNDING, group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER)))) return false; \
|
2014-10-07 13:37:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#define CONFIG_PATH(TARGET, NAME, SHORT, DEF, group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER) \
|
|
|
|
{ \
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!(settings_list_append(list, list_info, setting_string_setting(ST_PATH, NAME, SHORT, TARGET, sizeof(TARGET), DEF, "", group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER)))) return false; \
|
2014-10-07 13:37:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#define CONFIG_DIR(TARGET, NAME, SHORT, DEF, EMPTY, group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER) \
|
|
|
|
{ \
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!(settings_list_append(list, list_info, setting_string_setting(ST_DIR, NAME, SHORT, TARGET, sizeof(TARGET), DEF, EMPTY, group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER)))) return false; \
|
2014-10-07 13:37:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#define CONFIG_STRING(TARGET, NAME, SHORT, DEF, group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER) \
|
|
|
|
{ \
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!(settings_list_append(list, list_info, setting_string_setting(ST_STRING, NAME, SHORT, TARGET, sizeof(TARGET), DEF, "", group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER)))) return false; \
|
2014-10-07 13:37:29 +00:00
|
|
|
}
|
|
|
|
|
2014-11-11 17:11:48 +00:00
|
|
|
#define CONFIG_STRING_OPTIONS(TARGET, NAME, SHORT, DEF, OPTS, group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER) \
|
|
|
|
{ \
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!(settings_list_append(list, list_info, setting_string_setting_options(ST_STRING, NAME, SHORT, TARGET, sizeof(TARGET), DEF, "", OPTS, group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER)))) return false; \
|
2014-11-11 17:11:48 +00:00
|
|
|
}
|
|
|
|
|
2015-03-14 22:21:55 +00:00
|
|
|
#define CONFIG_HEX(TARGET, NAME, SHORT, DEF, group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER) \
|
|
|
|
{ \
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!(settings_list_append(list, list_info, setting_hex_setting(NAME, SHORT, &TARGET, DEF, group_info, subgroup_info, CHANGE_HANDLER, READ_HANDLER)))) return false; \
|
2015-03-14 22:21:55 +00:00
|
|
|
}
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-17 06:14:17 +00:00
|
|
|
#define CONFIG_BIND(TARGET, PLAYER, PLAYER_OFFSET, NAME, SHORT, DEF, group_info, subgroup_info) \
|
2014-10-07 13:37:29 +00:00
|
|
|
{ \
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!(settings_list_append(list, list_info, setting_bind_setting (NAME, SHORT, &TARGET, PLAYER, PLAYER_OFFSET, DEF, group_info, subgroup_info)))) return false; \
|
2014-10-07 13:37:29 +00:00
|
|
|
}
|
2013-11-22 14:30:02 +00:00
|
|
|
|
2014-08-16 16:11:40 +00:00
|
|
|
#ifdef GEKKO
|
|
|
|
#define MAX_GAMMA_SETTING 2
|
|
|
|
#else
|
|
|
|
#define MAX_GAMMA_SETTING 1
|
|
|
|
#endif
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static void setting_add_special_callbacks(
|
2014-10-14 22:47:38 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
unsigned values)
|
|
|
|
{
|
2014-10-20 02:35:02 +00:00
|
|
|
unsigned idx = list_info->index - 1;
|
2014-10-15 04:46:00 +00:00
|
|
|
|
|
|
|
if (values & SD_FLAG_ALLOW_INPUT)
|
2014-10-16 00:53:35 +00:00
|
|
|
{
|
2014-10-20 02:35:02 +00:00
|
|
|
switch ((*list)[idx].type)
|
2014-10-16 00:53:35 +00:00
|
|
|
{
|
|
|
|
case ST_UINT:
|
2015-03-20 23:56:26 +00:00
|
|
|
(*list)[idx].action_start = setting_uint_action_start_linefeed;
|
|
|
|
(*list)[idx].action_ok = setting_uint_action_ok_linefeed;
|
2015-01-09 03:43:24 +00:00
|
|
|
(*list)[idx].action_cancel = NULL;
|
2014-10-16 00:53:35 +00:00
|
|
|
break;
|
2015-03-14 22:21:55 +00:00
|
|
|
case ST_HEX:
|
2015-03-20 23:56:26 +00:00
|
|
|
(*list)[idx].action_start = setting_uint_action_start_linefeed;
|
|
|
|
(*list)[idx].action_ok = setting_hex_action_ok_linefeed;
|
2015-03-14 22:21:55 +00:00
|
|
|
(*list)[idx].action_cancel = NULL;
|
|
|
|
break;
|
2014-10-16 00:53:35 +00:00
|
|
|
case ST_STRING:
|
2015-03-20 23:56:26 +00:00
|
|
|
(*list)[idx].action_start = setting_string_action_start_allow_input;
|
|
|
|
(*list)[idx].action_ok = setting_string_action_ok_allow_input;
|
2015-01-09 03:43:24 +00:00
|
|
|
(*list)[idx].action_cancel = NULL;
|
2014-10-16 00:53:35 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2014-10-15 04:46:00 +00:00
|
|
|
else if (values & SD_FLAG_IS_DRIVER)
|
2015-03-20 23:56:26 +00:00
|
|
|
(*list)[idx].action_toggle = setting_string_action_toggle_driver;
|
2014-10-14 22:47:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void settings_data_list_current_add_flags(
|
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info,
|
|
|
|
unsigned values)
|
|
|
|
{
|
|
|
|
settings_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
values);
|
2015-03-20 23:56:26 +00:00
|
|
|
setting_add_special_callbacks(list, list_info, values);
|
2014-10-14 22:47:38 +00:00
|
|
|
}
|
|
|
|
|
2015-01-07 02:53:18 +00:00
|
|
|
|
2015-01-08 23:23:59 +00:00
|
|
|
/**
|
|
|
|
* load_content_change_handler:
|
|
|
|
* @data : pointer to setting
|
|
|
|
*
|
|
|
|
* Function callback for 'Load Content' action's 'Change Handler'
|
|
|
|
* function pointer.
|
|
|
|
**/
|
2015-01-13 02:37:08 +00:00
|
|
|
static void load_content_change_handler(void *data)
|
2015-01-07 14:49:56 +00:00
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t *)data;
|
2015-01-08 23:23:59 +00:00
|
|
|
|
|
|
|
if (!setting)
|
2015-01-08 23:38:50 +00:00
|
|
|
return;
|
2015-01-07 14:49:56 +00:00
|
|
|
|
|
|
|
/* This does not appear to be robust enough because sometimes I get
|
|
|
|
* crashes. I think it is because LOAD_CORE has not yet run. I'm not
|
|
|
|
* sure the best way to test for that.
|
|
|
|
*/
|
|
|
|
rarch_main_command(RARCH_CMD_LOAD_CONTENT);
|
2015-01-07 02:53:18 +00:00
|
|
|
}
|
|
|
|
|
2015-01-13 02:32:43 +00:00
|
|
|
static void overlay_enable_toggle_change_handler(void *data)
|
|
|
|
{
|
|
|
|
rarch_setting_t *setting = (rarch_setting_t *)data;
|
|
|
|
|
|
|
|
if (!setting)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (setting->value.boolean)
|
|
|
|
rarch_main_command(RARCH_CMD_OVERLAY_INIT);
|
|
|
|
else
|
|
|
|
rarch_main_command(RARCH_CMD_OVERLAY_DEINIT);
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_main_menu_options(
|
2014-10-06 23:53:14 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
2014-08-27 19:14:36 +00:00
|
|
|
{
|
2014-10-06 14:57:20 +00:00
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2015-03-20 18:57:16 +00:00
|
|
|
driver_t *driver = driver_get_ptr();
|
|
|
|
settings_t *settings = config_get_ptr();
|
2015-03-21 04:42:49 +00:00
|
|
|
global_t *global = global_get_ptr();
|
2014-08-27 19:14:36 +00:00
|
|
|
|
2014-10-06 20:13:19 +00:00
|
|
|
START_GROUP(group_info, "Main Menu");
|
2014-10-06 20:15:10 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info);
|
2014-08-27 21:12:55 +00:00
|
|
|
#if defined(HAVE_DYNAMIC) || defined(HAVE_LIBRETRO_MANAGEMENT)
|
2014-10-22 22:51:11 +00:00
|
|
|
CONFIG_ACTION(
|
2014-10-07 14:05:13 +00:00
|
|
|
"core_list",
|
2015-01-22 02:45:48 +00:00
|
|
|
"Core Selection",
|
2014-10-07 14:05:13 +00:00
|
|
|
group_info.name,
|
2014-10-22 22:51:11 +00:00
|
|
|
subgroup_info.name);
|
2015-03-20 18:57:16 +00:00
|
|
|
(*list)[list_info->index - 1].size = sizeof(settings->libretro);
|
|
|
|
(*list)[list_info->index - 1].value.string = settings->libretro;
|
2015-01-07 02:53:18 +00:00
|
|
|
(*list)[list_info->index - 1].values = EXT_EXECUTABLES;
|
|
|
|
// It is not a good idea to have chosen action_toggle as the place
|
|
|
|
// to put this callback. It should be called whenever the browser
|
|
|
|
// needs to get the directory to browse into. It's not quite like
|
|
|
|
// get_string_representation, but it is close.
|
|
|
|
(*list)[list_info->index - 1].action_toggle = core_list_action_toggle;
|
|
|
|
(*list)[list_info->index - 1].change_handler = core_list_change_handler;
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_BROWSER_ACTION);
|
2014-10-06 20:13:19 +00:00
|
|
|
#endif
|
2014-12-21 22:41:17 +00:00
|
|
|
|
2015-01-28 07:55:02 +00:00
|
|
|
#ifdef HAVE_NETWORKING
|
2014-12-21 22:41:17 +00:00
|
|
|
CONFIG_ACTION(
|
2015-02-01 14:57:25 +00:00
|
|
|
"core_updater_list",
|
2015-01-31 05:06:21 +00:00
|
|
|
"Core Updater",
|
2014-12-21 22:41:17 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name);
|
2015-01-15 00:27:35 +00:00
|
|
|
#endif
|
2014-12-21 22:41:17 +00:00
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
if (settings->history_list_enable)
|
2014-10-06 20:15:10 +00:00
|
|
|
{
|
2014-10-22 22:51:11 +00:00
|
|
|
CONFIG_ACTION(
|
2014-10-07 14:05:13 +00:00
|
|
|
"history_list",
|
|
|
|
"Load Content (History)",
|
|
|
|
group_info.name,
|
2014-10-22 22:51:11 +00:00
|
|
|
subgroup_info.name);
|
2014-10-06 20:15:10 +00:00
|
|
|
}
|
2014-10-07 14:05:13 +00:00
|
|
|
if (
|
2015-03-18 18:40:00 +00:00
|
|
|
driver->menu
|
2015-03-21 04:42:49 +00:00
|
|
|
&& global->core_info
|
|
|
|
&& core_info_list_num_info_files(global->core_info))
|
2014-10-06 20:15:10 +00:00
|
|
|
{
|
2014-10-22 22:51:11 +00:00
|
|
|
CONFIG_ACTION(
|
2014-10-07 14:05:13 +00:00
|
|
|
"detect_core_list",
|
|
|
|
"Load Content (Detect Core)",
|
|
|
|
group_info.name,
|
2014-10-22 22:51:11 +00:00
|
|
|
subgroup_info.name);
|
2015-01-07 00:38:06 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_BROWSER_ACTION);
|
2014-10-06 20:15:10 +00:00
|
|
|
}
|
2014-10-22 22:51:11 +00:00
|
|
|
CONFIG_ACTION(
|
2014-10-07 14:05:13 +00:00
|
|
|
"load_content",
|
|
|
|
"Load Content",
|
|
|
|
group_info.name,
|
2014-10-22 22:51:11 +00:00
|
|
|
subgroup_info.name);
|
2015-03-21 04:42:49 +00:00
|
|
|
(*list)[list_info->index - 1].size = sizeof(global->fullpath);
|
|
|
|
(*list)[list_info->index - 1].value.string = global->fullpath;
|
2015-01-07 02:53:18 +00:00
|
|
|
(*list)[list_info->index - 1].action_toggle = load_content_action_toggle;
|
|
|
|
(*list)[list_info->index - 1].change_handler = load_content_change_handler;
|
2015-01-07 00:38:06 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_BROWSER_ACTION);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2015-03-24 13:48:23 +00:00
|
|
|
{
|
|
|
|
struct retro_system_info *info = (struct retro_system_info*)
|
|
|
|
global ? &global->system.info : NULL;
|
|
|
|
|
|
|
|
if (info && strcmp(info->library_name, "No Core") != 0)
|
|
|
|
CONFIG_ACTION(
|
|
|
|
"unload_core",
|
|
|
|
"Unload Core",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name);
|
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_UNLOAD_CORE);
|
|
|
|
}
|
2014-12-06 14:47:25 +00:00
|
|
|
|
2014-10-22 22:51:11 +00:00
|
|
|
CONFIG_ACTION(
|
2014-10-07 14:05:13 +00:00
|
|
|
"core_information",
|
|
|
|
"Core Information",
|
|
|
|
group_info.name,
|
2014-10-22 22:51:11 +00:00
|
|
|
subgroup_info.name);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2015-02-13 02:20:25 +00:00
|
|
|
CONFIG_ACTION(
|
|
|
|
"management",
|
|
|
|
"Management",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name);
|
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
CONFIG_ACTION(
|
2015-02-13 01:59:13 +00:00
|
|
|
"options",
|
|
|
|
"Options",
|
2015-02-12 18:52:57 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name);
|
|
|
|
|
2014-10-22 22:51:11 +00:00
|
|
|
CONFIG_ACTION(
|
2014-10-07 14:05:13 +00:00
|
|
|
"settings",
|
|
|
|
"Settings",
|
|
|
|
group_info.name,
|
2014-10-22 22:51:11 +00:00
|
|
|
subgroup_info.name);
|
2014-10-28 06:07:07 +00:00
|
|
|
|
2015-03-21 04:42:49 +00:00
|
|
|
if (global->perfcnt_enable)
|
2014-10-06 20:15:10 +00:00
|
|
|
{
|
2014-10-22 22:51:11 +00:00
|
|
|
CONFIG_ACTION(
|
2014-10-07 14:05:13 +00:00
|
|
|
"performance_counters",
|
|
|
|
"Performance Counters",
|
|
|
|
group_info.name,
|
2014-10-22 22:51:11 +00:00
|
|
|
subgroup_info.name);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-06 20:15:10 +00:00
|
|
|
}
|
2015-03-21 04:42:49 +00:00
|
|
|
if (global->main_is_init && !global->libretro_dummy)
|
2014-10-06 20:15:10 +00:00
|
|
|
{
|
2014-10-22 23:53:24 +00:00
|
|
|
CONFIG_ACTION(
|
2014-10-07 14:05:13 +00:00
|
|
|
"savestate",
|
|
|
|
"Save State",
|
|
|
|
group_info.name,
|
2014-10-22 23:53:24 +00:00
|
|
|
subgroup_info.name);
|
2015-03-20 23:56:26 +00:00
|
|
|
(*list)[list_info->index - 1].action_toggle = &setting_action_toggle_savestates;
|
|
|
|
(*list)[list_info->index - 1].action_start = &setting_action_start_savestates;
|
|
|
|
(*list)[list_info->index - 1].action_ok = &setting_bool_action_ok_exit;
|
2014-10-22 23:53:24 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation = &get_string_representation_savestate;
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd (list, list_info, RARCH_CMD_SAVE_STATE);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-22 23:53:24 +00:00
|
|
|
CONFIG_ACTION(
|
2014-10-07 14:05:13 +00:00
|
|
|
"loadstate",
|
|
|
|
"Load State",
|
|
|
|
group_info.name,
|
2014-10-22 23:53:24 +00:00
|
|
|
subgroup_info.name);
|
2015-03-20 23:56:26 +00:00
|
|
|
(*list)[list_info->index - 1].action_toggle = &setting_action_toggle_savestates;
|
|
|
|
(*list)[list_info->index - 1].action_start = &setting_action_start_savestates;
|
|
|
|
(*list)[list_info->index - 1].action_ok = &setting_bool_action_ok_exit;
|
2014-10-22 23:53:24 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation = &get_string_representation_savestate;
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd (list, list_info, RARCH_CMD_LOAD_STATE);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-23 00:04:22 +00:00
|
|
|
CONFIG_ACTION(
|
2014-10-07 14:05:13 +00:00
|
|
|
"take_screenshot",
|
|
|
|
"Take Screenshot",
|
|
|
|
group_info.name,
|
2014-10-23 00:04:22 +00:00
|
|
|
subgroup_info.name);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd (list, list_info, RARCH_CMD_TAKE_SCREENSHOT);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-23 00:04:22 +00:00
|
|
|
CONFIG_ACTION(
|
2014-10-07 14:05:13 +00:00
|
|
|
"resume_content",
|
|
|
|
"Resume Content",
|
|
|
|
group_info.name,
|
2014-10-23 00:04:22 +00:00
|
|
|
subgroup_info.name);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd (list, list_info, RARCH_CMD_RESUME);
|
2015-03-20 23:56:26 +00:00
|
|
|
(*list)[list_info->index - 1].action_ok = &setting_bool_action_ok_exit;
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-23 00:04:22 +00:00
|
|
|
CONFIG_ACTION(
|
2014-10-07 14:05:13 +00:00
|
|
|
"restart_content",
|
|
|
|
"Restart Content",
|
|
|
|
group_info.name,
|
2014-10-23 00:04:22 +00:00
|
|
|
subgroup_info.name);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_RESET);
|
2015-03-20 23:56:26 +00:00
|
|
|
(*list)[list_info->index - 1].action_ok = &setting_bool_action_ok_exit;
|
2014-10-06 20:15:10 +00:00
|
|
|
}
|
|
|
|
#ifndef HAVE_DYNAMIC
|
2014-10-23 00:04:22 +00:00
|
|
|
CONFIG_ACTION(
|
2014-10-07 14:05:13 +00:00
|
|
|
"restart_retroarch",
|
|
|
|
"Restart RetroArch",
|
|
|
|
group_info.name,
|
2014-10-23 00:04:22 +00:00
|
|
|
subgroup_info.name);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_RESTART_RETROARCH);
|
2014-10-06 20:15:10 +00:00
|
|
|
#endif
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-22 22:51:11 +00:00
|
|
|
CONFIG_ACTION(
|
2014-10-07 14:05:13 +00:00
|
|
|
"configurations",
|
|
|
|
"Configurations",
|
|
|
|
group_info.name,
|
2014-10-22 22:51:11 +00:00
|
|
|
subgroup_info.name);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-23 00:04:22 +00:00
|
|
|
CONFIG_ACTION(
|
2014-10-07 14:05:13 +00:00
|
|
|
"save_new_config",
|
|
|
|
"Save New Config",
|
|
|
|
group_info.name,
|
2014-10-23 00:04:22 +00:00
|
|
|
subgroup_info.name);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_MENU_SAVE_CONFIG);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-22 22:51:11 +00:00
|
|
|
CONFIG_ACTION(
|
2014-10-07 14:05:13 +00:00
|
|
|
"help",
|
|
|
|
"Help",
|
|
|
|
group_info.name,
|
2014-10-22 22:51:11 +00:00
|
|
|
subgroup_info.name);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2015-03-24 13:32:42 +00:00
|
|
|
|
2014-10-08 00:46:23 +00:00
|
|
|
#if !defined(IOS)
|
2015-01-08 23:23:59 +00:00
|
|
|
/* Apple rejects iOS apps that lets you forcibly quit an application. */
|
2014-10-23 00:04:22 +00:00
|
|
|
CONFIG_ACTION(
|
2014-10-07 14:05:13 +00:00
|
|
|
"quit_retroarch",
|
|
|
|
"Quit RetroArch",
|
|
|
|
group_info.name,
|
2014-10-23 00:04:22 +00:00
|
|
|
subgroup_info.name);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_QUIT_RETROARCH);
|
2014-10-08 00:46:23 +00:00
|
|
|
#endif
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
END_GROUP(list, list_info);
|
|
|
|
|
2014-10-06 23:53:14 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_driver_options(
|
2014-10-06 23:53:14 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
2013-11-22 14:30:02 +00:00
|
|
|
{
|
2014-10-06 14:57:20 +00:00
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2015-03-20 18:57:16 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2014-11-11 17:11:48 +00:00
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "Driver Settings");
|
2014-10-07 20:48:57 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info);
|
2014-11-11 17:11:48 +00:00
|
|
|
|
|
|
|
CONFIG_STRING_OPTIONS(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->input.driver,
|
2014-10-07 13:37:29 +00:00
|
|
|
"input_driver",
|
|
|
|
"Input Driver",
|
|
|
|
config_get_default_input(),
|
2014-11-11 17:11:48 +00:00
|
|
|
config_get_input_driver_options(),
|
2014-10-07 13:37:29 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
NULL,
|
|
|
|
NULL);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_IS_DRIVER);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-11-26 20:48:02 +00:00
|
|
|
CONFIG_STRING_OPTIONS(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->video.driver,
|
2014-10-07 13:37:29 +00:00
|
|
|
"video_driver",
|
|
|
|
"Video Driver",
|
|
|
|
config_get_default_video(),
|
2014-11-26 20:48:02 +00:00
|
|
|
config_get_video_driver_options(),
|
2014-10-07 13:37:29 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
NULL,
|
|
|
|
NULL);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_IS_DRIVER);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-11-26 20:48:02 +00:00
|
|
|
CONFIG_STRING_OPTIONS(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->audio.driver,
|
2014-10-07 13:37:29 +00:00
|
|
|
"audio_driver",
|
|
|
|
"Audio Driver",
|
|
|
|
config_get_default_audio(),
|
2014-11-26 20:48:02 +00:00
|
|
|
config_get_audio_driver_options(),
|
2014-10-07 13:37:29 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
NULL,
|
|
|
|
NULL);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_IS_DRIVER);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-12-31 19:17:53 +00:00
|
|
|
CONFIG_STRING_OPTIONS(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->audio.resampler,
|
2014-10-07 13:37:29 +00:00
|
|
|
"audio_resampler_driver",
|
|
|
|
"Audio Resampler Driver",
|
|
|
|
config_get_default_audio_resampler(),
|
2014-12-31 19:17:53 +00:00
|
|
|
config_get_audio_resampler_driver_options(),
|
2014-10-07 13:37:29 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
NULL,
|
|
|
|
NULL);
|
2015-01-12 20:12:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_IS_DRIVER);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-11-26 20:48:02 +00:00
|
|
|
CONFIG_STRING_OPTIONS(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->camera.driver,
|
2014-10-07 13:37:29 +00:00
|
|
|
"camera_driver",
|
|
|
|
"Camera Driver",
|
|
|
|
config_get_default_camera(),
|
2014-11-26 20:48:02 +00:00
|
|
|
config_get_camera_driver_options(),
|
2014-10-07 13:37:29 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
NULL,
|
|
|
|
NULL);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_IS_DRIVER);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-11-26 20:48:02 +00:00
|
|
|
CONFIG_STRING_OPTIONS(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->location.driver,
|
2014-10-07 13:37:29 +00:00
|
|
|
"location_driver",
|
|
|
|
"Location Driver",
|
|
|
|
config_get_default_location(),
|
2014-11-26 20:48:02 +00:00
|
|
|
config_get_location_driver_options(),
|
2014-10-07 13:37:29 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
NULL,
|
|
|
|
NULL);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_IS_DRIVER);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-08-27 16:01:44 +00:00
|
|
|
#ifdef HAVE_MENU
|
2014-11-26 20:48:02 +00:00
|
|
|
CONFIG_STRING_OPTIONS(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->menu.driver,
|
2014-10-07 13:37:29 +00:00
|
|
|
"menu_driver",
|
|
|
|
"Menu Driver",
|
|
|
|
config_get_default_menu(),
|
2014-11-26 20:48:02 +00:00
|
|
|
config_get_menu_driver_options(),
|
2014-10-07 13:37:29 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
NULL,
|
|
|
|
NULL);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_IS_DRIVER);
|
2014-08-27 16:01:44 +00:00
|
|
|
#endif
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-11-26 20:56:53 +00:00
|
|
|
CONFIG_STRING_OPTIONS(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->input.joypad_driver,
|
2014-10-07 13:37:29 +00:00
|
|
|
"input_joypad_driver",
|
|
|
|
"Joypad Driver",
|
|
|
|
config_get_default_joypad(),
|
2014-11-26 20:56:53 +00:00
|
|
|
config_get_joypad_driver_options(),
|
2014-10-07 13:37:29 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
NULL,
|
|
|
|
NULL);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_IS_DRIVER);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
END_GROUP(list, list_info);
|
|
|
|
|
2014-10-06 23:53:14 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_general_options(
|
2014-10-06 23:53:14 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
|
|
|
{
|
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2015-03-20 18:57:16 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-03-21 04:42:49 +00:00
|
|
|
global_t *global = global_get_ptr();
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "General Settings");
|
2015-02-15 16:48:38 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2015-02-15 16:48:38 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->load_dummy_on_core_shutdown,
|
2015-02-15 16:48:38 +00:00
|
|
|
"dummy_on_core_shutdown",
|
|
|
|
"Dummy On Core Shutdown",
|
|
|
|
load_dummy_on_core_shutdown,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2015-02-15 16:48:38 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->core_specific_config,
|
2015-02-15 16:48:38 +00:00
|
|
|
"core_specific_config",
|
|
|
|
"Configuration Per-Core",
|
|
|
|
default_core_specific_config,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
|
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
|
|
|
|
START_SUB_GROUP(list, list_info, "Logging", group_info.name, subgroup_info);
|
|
|
|
|
2014-10-07 13:37:29 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->verbosity,
|
2014-10-07 13:37:29 +00:00
|
|
|
"log_verbosity",
|
|
|
|
"Logging Verbosity",
|
|
|
|
false,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2014-10-17 02:17:28 +00:00
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
CONFIG_UINT(settings->libretro_log_level,
|
2014-10-07 13:37:29 +00:00
|
|
|
"libretro_log_level",
|
|
|
|
"Libretro Logging Level",
|
|
|
|
libretro_log_level,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 0, 3, 1.0, true, true);
|
2015-01-30 10:25:58 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation =
|
2015-03-20 23:56:26 +00:00
|
|
|
&setting_get_string_representation_uint_libretro_log_level;
|
2014-10-06 20:15:10 +00:00
|
|
|
|
2015-02-15 16:48:38 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
|
|
|
|
START_SUB_GROUP(list, list_info, "Performance Counters", group_info.name, subgroup_info);
|
|
|
|
|
2015-03-21 04:42:49 +00:00
|
|
|
CONFIG_BOOL(global->perfcnt_enable,
|
2014-10-07 13:37:29 +00:00
|
|
|
"perfcnt_enable",
|
|
|
|
"Performance Counters",
|
|
|
|
false,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2015-03-20 18:57:16 +00:00
|
|
|
CONFIG_BOOL(settings->config_save_on_exit,
|
2014-10-07 13:37:29 +00:00
|
|
|
"config_save_on_exit",
|
|
|
|
"Configuration Save On Exit",
|
|
|
|
config_save_on_exit,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-02-15 16:48:38 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2015-02-15 16:48:38 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Frame rewinding", group_info.name, subgroup_info);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->rewind_enable,
|
2014-10-07 13:37:29 +00:00
|
|
|
"rewind_enable",
|
|
|
|
"Rewind",
|
|
|
|
rewind_enable,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_REWIND_TOGGLE);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
2014-09-09 15:20:15 +00:00
|
|
|
#if 0
|
2014-10-07 13:37:29 +00:00
|
|
|
CONFIG_SIZE(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->rewind_buffer_size,
|
2014-10-07 13:37:29 +00:00
|
|
|
"rewind_buffer_size",
|
|
|
|
"Rewind Buffer Size",
|
|
|
|
rewind_buffer_size,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler)
|
2014-09-09 15:20:15 +00:00
|
|
|
#endif
|
2014-10-07 13:37:29 +00:00
|
|
|
CONFIG_UINT(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->rewind_granularity,
|
2014-10-07 13:37:29 +00:00
|
|
|
"rewind_granularity",
|
|
|
|
"Rewind Granularity",
|
|
|
|
rewind_granularity,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 1, 32768, 1, true, false);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2015-02-15 16:48:38 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
|
|
|
|
START_SUB_GROUP(list, list_info, "Saving", group_info.name, subgroup_info);
|
|
|
|
|
2014-10-07 13:37:29 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->block_sram_overwrite,
|
2014-10-07 13:37:29 +00:00
|
|
|
"block_sram_overwrite",
|
|
|
|
"SRAM Block overwrite",
|
|
|
|
block_sram_overwrite,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
2015-02-10 21:28:08 +00:00
|
|
|
general_read_handler);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-07-16 23:33:04 +00:00
|
|
|
#ifdef HAVE_THREADS
|
2014-10-07 13:37:29 +00:00
|
|
|
CONFIG_UINT(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->autosave_interval,
|
2014-10-07 13:37:29 +00:00
|
|
|
"autosave_interval",
|
|
|
|
"SRAM Autosave",
|
|
|
|
autosave_interval,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_AUTOSAVE_INIT);
|
|
|
|
settings_list_current_add_range(list, list_info, 0, 0, 10, true, false);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
2015-01-30 10:25:58 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation =
|
2015-03-20 23:56:26 +00:00
|
|
|
&setting_get_string_representation_uint_autosave_interval;
|
2014-07-16 23:33:04 +00:00
|
|
|
#endif
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->savestate_auto_index,
|
2014-10-07 13:37:29 +00:00
|
|
|
"savestate_auto_index",
|
|
|
|
"Save State Auto Index",
|
|
|
|
savestate_auto_index,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->savestate_auto_save,
|
2014-10-07 13:37:29 +00:00
|
|
|
"savestate_auto_save",
|
|
|
|
"Auto Save State",
|
|
|
|
savestate_auto_save,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->savestate_auto_load,
|
2014-10-07 13:37:29 +00:00
|
|
|
"savestate_auto_load",
|
|
|
|
"Auto Load State",
|
|
|
|
savestate_auto_load,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-02-15 16:48:38 +00:00
|
|
|
|
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
|
|
|
|
START_SUB_GROUP(list, list_info, "Frame throttling", group_info.name, subgroup_info);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->fastforward_ratio_throttle_enable,
|
2015-02-15 16:48:38 +00:00
|
|
|
"fastforward_ratio_throttle_enable",
|
|
|
|
"Limit Maximum Run Speed",
|
|
|
|
fastforward_ratio_throttle_enable,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
2014-10-07 13:37:29 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-02-15 16:48:38 +00:00
|
|
|
CONFIG_FLOAT(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->fastforward_ratio,
|
2015-02-15 16:48:38 +00:00
|
|
|
"fastforward_ratio",
|
|
|
|
"Maximum Run Speed",
|
|
|
|
fastforward_ratio,
|
|
|
|
"%.1fx",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_list_current_add_range(list, list_info, 1, 10, 0.1, true, true);
|
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-03-20 18:57:16 +00:00
|
|
|
settings->slowmotion_ratio,
|
2015-02-15 16:48:38 +00:00
|
|
|
"slowmotion_ratio",
|
|
|
|
"Slow-Motion Ratio",
|
|
|
|
slowmotion_ratio,
|
|
|
|
"%.1fx",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_list_current_add_range(list, list_info, 1, 10, 1.0, true, true);
|
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
2015-02-15 16:48:38 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_GROUP(list, list_info);
|
|
|
|
|
2014-10-06 23:53:14 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_video_options(
|
2014-10-06 23:53:14 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
|
|
|
{
|
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-03-21 04:42:49 +00:00
|
|
|
global_t *global = global_get_ptr();
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "Video Settings");
|
2014-10-06 20:15:10 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
2015-03-20 20:22:38 +00:00
|
|
|
CONFIG_BOOL(settings->fps_show,
|
2015-02-15 16:48:38 +00:00
|
|
|
"fps_show",
|
|
|
|
"Show Framerate",
|
|
|
|
fps_show,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2014-10-07 14:28:25 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.shared_context,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_shared_context",
|
|
|
|
"HW Shared Context Enable",
|
|
|
|
false,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
START_SUB_GROUP(list, list_info, "Monitor", group_info.name, subgroup_info);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.monitor_index,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_monitor_index",
|
|
|
|
"Monitor Index",
|
|
|
|
monitor_index,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_REINIT);
|
|
|
|
settings_list_current_add_range(list, list_info, 0, 1, 1, true, false);
|
2015-01-30 10:12:59 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation =
|
2015-03-20 23:56:26 +00:00
|
|
|
&setting_get_string_representation_uint_video_monitor_index;
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
2014-07-16 23:00:46 +00:00
|
|
|
#if !defined(RARCH_CONSOLE) && !defined(RARCH_MOBILE)
|
2014-10-07 14:28:25 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.fullscreen,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_fullscreen",
|
|
|
|
"Use Fullscreen mode",
|
|
|
|
fullscreen,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_REINIT);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
2014-07-16 23:00:46 +00:00
|
|
|
#endif
|
2014-10-07 14:28:25 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.windowed_fullscreen,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_windowed_fullscreen",
|
|
|
|
"Windowed Fullscreen Mode",
|
|
|
|
windowed_fullscreen,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.fullscreen_x,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_fullscreen_x",
|
|
|
|
"Fullscreen Width",
|
|
|
|
fullscreen_x,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.fullscreen_y,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_fullscreen_y",
|
|
|
|
"Fullscreen Height",
|
|
|
|
fullscreen_y,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.refresh_rate,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_refresh_rate",
|
|
|
|
"Refresh Rate",
|
|
|
|
refresh_rate,
|
|
|
|
"%.3f Hz",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 0, 0, 0.001, true, false);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.refresh_rate,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_refresh_rate_auto",
|
|
|
|
"Estimated Monitor FPS",
|
|
|
|
refresh_rate,
|
|
|
|
"%.3f Hz",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-16 00:53:35 +00:00
|
|
|
(*list)[list_info->index - 1].action_start =
|
2015-03-20 23:56:26 +00:00
|
|
|
&setting_action_start_video_refresh_rate_auto;
|
2014-10-14 22:56:20 +00:00
|
|
|
(*list)[list_info->index - 1].action_ok =
|
2015-03-20 23:56:26 +00:00
|
|
|
&setting_action_ok_video_refresh_rate_auto;
|
2015-01-30 09:59:28 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation =
|
2015-03-20 23:56:26 +00:00
|
|
|
&setting_get_string_representation_st_float_video_refresh_rate_auto;
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.force_srgb_disable,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_force_srgb_disable",
|
|
|
|
"Force-disable sRGB FBO",
|
|
|
|
false,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_REINIT);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO|SD_FLAG_ADVANCED);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
|
|
|
|
START_SUB_GROUP(list, list_info, "Aspect", group_info.name, subgroup_info);
|
2014-10-07 14:28:25 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.force_aspect,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_force_aspect",
|
|
|
|
"Force aspect ratio",
|
|
|
|
force_aspect,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.aspect_ratio,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_aspect_ratio",
|
|
|
|
"Aspect Ratio",
|
|
|
|
aspect_ratio,
|
|
|
|
"%.2f",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.aspect_ratio_auto,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_aspect_ratio_auto",
|
|
|
|
"Use Auto Aspect Ratio",
|
|
|
|
aspect_ratio_auto,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.aspect_ratio_idx,
|
2014-10-07 14:28:25 +00:00
|
|
|
"aspect_ratio_index",
|
|
|
|
"Aspect Ratio Index",
|
|
|
|
aspect_ratio_idx,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(
|
2014-10-07 14:28:25 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
RARCH_CMD_VIDEO_SET_ASPECT_RATIO);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(
|
2014-10-07 14:28:25 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
0,
|
|
|
|
LAST_ASPECT_RATIO,
|
|
|
|
1,
|
|
|
|
true,
|
|
|
|
true);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
2015-01-30 10:12:59 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation =
|
2015-03-20 23:56:26 +00:00
|
|
|
&setting_get_string_representation_uint_aspect_ratio_index;
|
2014-10-07 14:28:25 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
|
|
|
|
START_SUB_GROUP(list, list_info, "Scaling", group_info.name, subgroup_info);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
2014-07-16 23:12:01 +00:00
|
|
|
#if !defined(RARCH_CONSOLE) && !defined(RARCH_MOBILE)
|
2014-10-07 14:28:25 +00:00
|
|
|
CONFIG_FLOAT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.scale,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_scale",
|
|
|
|
"Windowed Scale",
|
|
|
|
scale,
|
|
|
|
"%.1fx",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 1.0, 10.0, 1.0, true, true);
|
2014-07-16 23:12:01 +00:00
|
|
|
#endif
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.scale_integer,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_scale_integer",
|
|
|
|
"Integer Scale",
|
|
|
|
scale_integer,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_INT(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->console.screen.viewports.custom_vp.x,
|
2014-10-07 14:28:25 +00:00
|
|
|
"custom_viewport_x",
|
|
|
|
"Custom Viewport X",
|
|
|
|
0,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
NULL,
|
|
|
|
NULL);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_INT(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->console.screen.viewports.custom_vp.y,
|
2014-10-07 14:28:25 +00:00
|
|
|
"custom_viewport_y",
|
|
|
|
"Custom Viewport Y",
|
|
|
|
0,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
NULL,
|
|
|
|
NULL);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->console.screen.viewports.custom_vp.width,
|
2014-10-07 14:28:25 +00:00
|
|
|
"custom_viewport_width",
|
|
|
|
"Custom Viewport Width",
|
|
|
|
0,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
NULL,
|
|
|
|
NULL);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->console.screen.viewports.custom_vp.height,
|
2014-10-07 14:28:25 +00:00
|
|
|
"custom_viewport_height",
|
|
|
|
"Custom Viewport Height",
|
|
|
|
0,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
NULL,
|
|
|
|
NULL);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
2014-08-11 09:00:11 +00:00
|
|
|
#ifdef GEKKO
|
2014-10-07 14:28:25 +00:00
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.viwidth,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_viwidth",
|
|
|
|
"Set Screen Width",
|
|
|
|
video_viwidth,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 640, 720, 2, true, true);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.vfilter,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_vfilter",
|
|
|
|
"Deflicker",
|
|
|
|
video_vfilter,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-08-11 09:00:11 +00:00
|
|
|
#endif
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.smooth,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_smooth",
|
|
|
|
"Use Bilinear Filtering",
|
|
|
|
video_smooth,
|
|
|
|
"Point filtering",
|
|
|
|
"Bilinear filtering",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2014-08-31 01:50:44 +00:00
|
|
|
#if defined(__CELLOS_LV2__)
|
2014-10-07 14:28:25 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->console.screen.pal60_enable,
|
2014-10-07 14:28:25 +00:00
|
|
|
"pal60_enable",
|
|
|
|
"Use PAL60 Mode",
|
|
|
|
false,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-08-31 01:50:44 +00:00
|
|
|
#endif
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.rotation,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_rotation",
|
|
|
|
"Rotation",
|
|
|
|
0,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
|
2015-01-30 10:12:59 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation =
|
2015-03-20 23:56:26 +00:00
|
|
|
&setting_get_string_representation_uint_video_rotation;
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
2014-08-16 16:11:40 +00:00
|
|
|
#if defined(HW_RVL) || defined(_XBOX360)
|
2014-10-07 14:28:25 +00:00
|
|
|
CONFIG_UINT(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->console.screen.gamma_correction,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_gamma",
|
|
|
|
"Gamma",
|
|
|
|
0,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(
|
2014-10-07 14:28:25 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
RARCH_CMD_VIDEO_APPLY_STATE_CHANGES);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(
|
2014-10-07 14:28:25 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
0,
|
|
|
|
MAX_GAMMA_SETTING,
|
|
|
|
1,
|
|
|
|
true,
|
|
|
|
true);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO|SD_FLAG_ADVANCED);
|
|
|
|
|
2014-08-16 16:11:40 +00:00
|
|
|
#endif
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
2013-11-22 14:30:02 +00:00
|
|
|
|
2014-10-07 14:28:25 +00:00
|
|
|
START_SUB_GROUP(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
"Synchronization",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info);
|
|
|
|
|
2014-07-16 23:33:04 +00:00
|
|
|
#if defined(HAVE_THREADS) && !defined(RARCH_CONSOLE)
|
2014-10-07 14:28:25 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.threaded,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_threaded",
|
|
|
|
"Threaded Video",
|
|
|
|
video_threaded,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_REINIT);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO|SD_FLAG_ADVANCED);
|
2014-07-16 23:33:04 +00:00
|
|
|
#endif
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.vsync,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_vsync",
|
|
|
|
"VSync",
|
|
|
|
vsync,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.swap_interval,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_swap_interval",
|
|
|
|
"VSync Swap Interval",
|
|
|
|
swap_interval,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_VIDEO_SET_BLOCKING_STATE);
|
|
|
|
settings_list_current_add_range(list, list_info, 1, 4, 1, true, true);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO|SD_FLAG_ADVANCED);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.hard_sync,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_hard_sync",
|
|
|
|
"Hard GPU Sync",
|
|
|
|
hard_sync,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.hard_sync_frames,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_hard_sync_frames",
|
|
|
|
"Hard GPU Sync Frames",
|
|
|
|
hard_sync_frames,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.frame_delay,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_frame_delay",
|
|
|
|
"Frame Delay",
|
|
|
|
frame_delay,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 0, 15, 1, true, true);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
2014-07-16 23:33:04 +00:00
|
|
|
#if !defined(RARCH_MOBILE)
|
2014-10-07 14:28:25 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.black_frame_insertion,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_black_frame_insertion",
|
|
|
|
"Black Frame Insertion",
|
|
|
|
black_frame_insertion,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-07-16 23:33:04 +00:00
|
|
|
#endif
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
|
2014-10-07 14:28:25 +00:00
|
|
|
START_SUB_GROUP(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
"Miscellaneous",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.post_filter_record,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_post_filter_record",
|
|
|
|
"Post filter record Enable",
|
|
|
|
post_filter_record,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.gpu_record,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_gpu_record",
|
|
|
|
"GPU Record Enable",
|
|
|
|
gpu_record,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.gpu_screenshot,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_gpu_screenshot",
|
|
|
|
"GPU Screenshot Enable",
|
|
|
|
gpu_screenshot,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.allow_rotate,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_allow_rotate",
|
|
|
|
"Allow rotation",
|
|
|
|
allow_rotate,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 14:28:25 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.crop_overscan,
|
2014-10-07 14:28:25 +00:00
|
|
|
"video_crop_overscan",
|
|
|
|
"Crop Overscan (reload)",
|
|
|
|
crop_overscan,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2014-08-31 01:38:21 +00:00
|
|
|
#if defined(_XBOX1) || defined(HW_RVL)
|
2014-10-07 14:28:25 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->console.softfilter_enable,
|
2014-10-07 14:28:25 +00:00
|
|
|
"soft_filter",
|
|
|
|
"Soft Filter Enable",
|
|
|
|
false,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(
|
2014-10-07 14:28:25 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
RARCH_CMD_VIDEO_APPLY_STATE_CHANGES);
|
2014-08-31 01:38:21 +00:00
|
|
|
#endif
|
2014-10-07 14:28:25 +00:00
|
|
|
|
2014-08-16 16:11:40 +00:00
|
|
|
#ifdef _XBOX1
|
2014-10-07 14:05:13 +00:00
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.swap_interval,
|
2014-10-07 14:05:13 +00:00
|
|
|
"video_filter_flicker",
|
|
|
|
"Flicker filter",
|
|
|
|
0,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 0, 5, 1, true, true);
|
2014-07-16 18:51:00 +00:00
|
|
|
#endif
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
END_GROUP(list, list_info);
|
|
|
|
|
2014-10-06 23:53:14 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_font_options(
|
2014-10-06 23:53:14 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
|
|
|
{
|
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "Font Settings");
|
2014-10-06 20:15:10 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Messages", group_info.name, subgroup_info);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_PATH(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.font_path,
|
2014-10-07 13:37:29 +00:00
|
|
|
"video_font_path",
|
|
|
|
"Font Path",
|
|
|
|
"",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.font_size,
|
2014-10-07 13:37:29 +00:00
|
|
|
"video_font_size",
|
|
|
|
"OSD Font Size",
|
|
|
|
font_size,
|
|
|
|
"%.1f",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 1.00, 100.00, 1.0, true, true);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2015-02-09 18:11:53 +00:00
|
|
|
#ifndef RARCH_CONSOLE
|
2014-10-07 13:37:29 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.font_enable,
|
2014-10-07 13:37:29 +00:00
|
|
|
"video_font_enable",
|
|
|
|
"OSD Font Enable",
|
|
|
|
font_enable,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-02-09 18:11:53 +00:00
|
|
|
#endif
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.msg_pos_x,
|
2014-10-07 13:37:29 +00:00
|
|
|
"video_message_pos_x",
|
|
|
|
"Message X Position",
|
|
|
|
message_pos_offset_x,
|
|
|
|
"%.3f",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 0, 1, 0.01, true, true);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.msg_pos_y,
|
2014-10-07 13:37:29 +00:00
|
|
|
"video_message_pos_y",
|
|
|
|
"Message Y Position",
|
|
|
|
message_pos_offset_y,
|
|
|
|
"%.3f",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 0, 1, 0.01, true, true);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
END_GROUP(list, list_info);
|
|
|
|
|
2014-10-06 23:53:14 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_audio_options(
|
2014-10-06 23:53:14 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
|
|
|
{
|
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-03-21 05:57:13 +00:00
|
|
|
global_t *global = global_get_ptr();
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "Audio Settings");
|
2014-10-06 20:15:10 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2015-03-21 05:57:13 +00:00
|
|
|
(void)global;
|
|
|
|
|
2014-10-07 13:37:29 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->audio.enable,
|
2014-10-07 13:37:29 +00:00
|
|
|
"audio_enable",
|
|
|
|
"Audio Enable",
|
|
|
|
audio_enable,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->audio.mute_enable,
|
2014-10-07 13:37:29 +00:00
|
|
|
"audio_mute_enable",
|
|
|
|
"Audio Mute",
|
|
|
|
false,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->audio.volume,
|
2014-10-07 13:37:29 +00:00
|
|
|
"audio_volume",
|
|
|
|
"Volume Level",
|
|
|
|
audio_volume,
|
|
|
|
"%.1f",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, -80, 12, 1.0, true, true);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-08-31 02:03:04 +00:00
|
|
|
#ifdef __CELLOS_LV2__
|
2014-10-07 13:37:29 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->console.sound.system_bgm_enable,
|
2014-10-07 13:37:29 +00:00
|
|
|
"system_bgm_enable",
|
|
|
|
"System BGM Enable",
|
|
|
|
false,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-08-31 02:03:04 +00:00
|
|
|
#endif
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
|
2014-10-07 13:37:29 +00:00
|
|
|
START_SUB_GROUP(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
"Synchronization",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->audio.sync,
|
2014-10-07 13:37:29 +00:00
|
|
|
"audio_sync",
|
|
|
|
"Audio Sync Enable",
|
|
|
|
audio_sync,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->audio.latency,
|
2014-10-07 13:37:29 +00:00
|
|
|
"audio_latency",
|
|
|
|
"Audio Latency",
|
|
|
|
g_defaults.settings.out_latency ?
|
|
|
|
g_defaults.settings.out_latency : out_latency,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-08 05:01:46 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 1, 256, 1.0, true, true);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_IS_DEFERRED|SD_FLAG_ADVANCED);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->audio.rate_control_delta,
|
2014-10-07 13:37:29 +00:00
|
|
|
"audio_rate_control_delta",
|
|
|
|
"Audio Rate Control Delta",
|
|
|
|
rate_control_delta,
|
|
|
|
"%.3f",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(
|
2014-10-07 14:05:13 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0.001,
|
|
|
|
true,
|
|
|
|
false);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-11-16 14:24:58 +00:00
|
|
|
CONFIG_FLOAT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->audio.max_timing_skew,
|
2014-11-16 14:24:58 +00:00
|
|
|
"audio_max_timing_skew",
|
|
|
|
"Audio Maximum Timing Skew",
|
|
|
|
max_timing_skew,
|
|
|
|
"%.2f",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_list_current_add_range(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
0.01,
|
|
|
|
0.5,
|
|
|
|
0.01,
|
|
|
|
true,
|
|
|
|
true);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-11-16 14:24:58 +00:00
|
|
|
|
2014-10-07 13:37:29 +00:00
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->audio.block_frames,
|
2014-10-07 13:37:29 +00:00
|
|
|
"audio_block_frames",
|
|
|
|
"Block Frames",
|
|
|
|
0,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
|
2014-10-07 13:37:29 +00:00
|
|
|
START_SUB_GROUP(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
"Miscellaneous",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info);
|
|
|
|
|
|
|
|
CONFIG_STRING(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->audio.device,
|
2014-10-07 13:37:29 +00:00
|
|
|
"audio_device",
|
|
|
|
"Device",
|
|
|
|
"",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-03-06 16:57:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT | SD_FLAG_ADVANCED);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->audio.out_rate,
|
2014-10-07 13:37:29 +00:00
|
|
|
"audio_out_rate",
|
|
|
|
"Audio Output Rate",
|
|
|
|
out_rate,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-03-06 16:57:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_PATH(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->audio.dsp_plugin,
|
2014-10-07 13:37:29 +00:00
|
|
|
"audio_dsp_plugin",
|
|
|
|
"DSP Plugin",
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->audio.filter_dir,
|
2014-10-07 13:37:29 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_values(list, list_info, "dsp");
|
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_DSP_FILTER_INIT);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
END_GROUP(list, list_info);
|
|
|
|
|
2014-10-06 23:53:14 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_input_options(
|
2014-10-06 23:53:14 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
|
|
|
{
|
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2014-12-05 12:48:54 +00:00
|
|
|
unsigned i, user;
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-03-21 04:42:49 +00:00
|
|
|
global_t *global = global_get_ptr();
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "Input Settings");
|
2014-10-06 20:15:10 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2015-01-05 00:45:57 +00:00
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.max_users,
|
2015-01-05 00:45:57 +00:00
|
|
|
"input_max_users",
|
|
|
|
"Max Users",
|
2015-01-05 00:58:00 +00:00
|
|
|
MAX_USERS,
|
2015-01-05 00:45:57 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-01-05 00:58:00 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 1, MAX_USERS, 1, true, true);
|
2015-01-05 00:45:57 +00:00
|
|
|
|
2015-01-05 21:53:21 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.remap_binds_enable,
|
2015-01-05 21:53:21 +00:00
|
|
|
"input_remap_binds_enable",
|
|
|
|
"Remap Binds Enable",
|
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2014-10-07 13:37:29 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.autodetect_enable,
|
2014-10-07 13:37:29 +00:00
|
|
|
"input_autodetect_enable",
|
2014-12-16 05:21:18 +00:00
|
|
|
"Autoconfig Enable",
|
2014-10-07 13:37:29 +00:00
|
|
|
input_autodetect_enable,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-12-04 12:26:27 +00:00
|
|
|
|
2014-12-16 05:21:18 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.autoconfig_descriptor_label_show,
|
2014-12-16 05:21:18 +00:00
|
|
|
"autoconfig_descriptor_label_show",
|
|
|
|
"Show Autoconfig Descriptor Labels",
|
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2014-12-04 12:26:27 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.input_descriptor_label_show,
|
2014-12-04 12:26:27 +00:00
|
|
|
"input_descriptor_label_show",
|
|
|
|
"Show Core Input Descriptor Labels",
|
|
|
|
input_descriptor_label_show,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2014-12-05 13:13:29 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.input_descriptor_hide_unbound,
|
2014-12-05 13:13:29 +00:00
|
|
|
"input_descriptor_hide_unbound",
|
|
|
|
"Hide Unbound Core Input Descriptors",
|
|
|
|
input_descriptor_hide_unbound,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
|
2014-10-07 13:37:29 +00:00
|
|
|
START_SUB_GROUP(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
"Joypad Mapping",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info);
|
|
|
|
|
2014-10-23 06:00:45 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->menu.bind_mode_keyboard,
|
2014-10-23 06:00:45 +00:00
|
|
|
"input_bind_mode",
|
|
|
|
"Bind Mode",
|
|
|
|
false,
|
|
|
|
"RetroPad",
|
|
|
|
"RetroKeyboard",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-03-20 20:22:38 +00:00
|
|
|
for (user = 0; user < settings->input.max_users; user ++)
|
2014-10-07 21:44:04 +00:00
|
|
|
{
|
2014-10-09 22:46:28 +00:00
|
|
|
/* These constants match the string lengths.
|
|
|
|
* Keep them up to date or you'll get some really obvious bugs.
|
2014-12-05 12:48:54 +00:00
|
|
|
* 2 is the length of '99'; we don't need more users than that.
|
2014-10-09 22:46:28 +00:00
|
|
|
*/
|
2014-10-22 06:45:32 +00:00
|
|
|
/* FIXME/TODO - really need to clean up this mess in some way. */
|
2015-01-05 00:58:00 +00:00
|
|
|
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_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_defaults[MAX_USERS][64];
|
2014-10-23 05:26:04 +00:00
|
|
|
|
2014-12-05 12:48:54 +00:00
|
|
|
snprintf(key[user], sizeof(key[user]),
|
|
|
|
"input_player%d_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_defaults[user], sizeof(key_bind_defaults[user]),
|
|
|
|
"input_player%u_bind_defaults", user + 1);
|
|
|
|
|
|
|
|
snprintf(label[user], sizeof(label[user]),
|
|
|
|
"User %d Device Index", user + 1);
|
|
|
|
snprintf(label_type[user], sizeof(label_type[user]),
|
|
|
|
"User %d Device Type", user + 1);
|
|
|
|
snprintf(label_analog[user], sizeof(label_analog[user]),
|
|
|
|
"User %d Analog To Digital Type", user + 1);
|
|
|
|
snprintf(label_bind_all[user], sizeof(label_bind_all[user]),
|
|
|
|
"User %d Bind All", user + 1);
|
|
|
|
snprintf(label_bind_defaults[user], sizeof(label_bind_defaults[user]),
|
|
|
|
"User %d Bind Default All", user + 1);
|
2014-10-23 04:24:02 +00:00
|
|
|
|
2014-10-22 06:42:51 +00:00
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.libretro_device[user],
|
2014-12-05 12:48:54 +00:00
|
|
|
key_type[user],
|
|
|
|
label_type[user],
|
|
|
|
user,
|
2014-10-22 06:42:51 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-12-05 12:48:54 +00:00
|
|
|
(*list)[list_info->index - 1].index = user + 1;
|
|
|
|
(*list)[list_info->index - 1].index_offset = user;
|
2015-03-20 23:56:26 +00:00
|
|
|
(*list)[list_info->index - 1].action_toggle = &setting_action_toggle_libretro_device_type;
|
|
|
|
(*list)[list_info->index - 1].action_start = &setting_action_start_libretro_device_type;
|
2015-01-30 10:12:59 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation =
|
2015-03-20 23:56:26 +00:00
|
|
|
&setting_get_string_representation_uint_libretro_device;
|
2014-10-22 06:42:51 +00:00
|
|
|
|
2014-10-23 04:24:02 +00:00
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.analog_dpad_mode[user],
|
2014-12-05 12:48:54 +00:00
|
|
|
key_analog[user],
|
|
|
|
label_analog[user],
|
|
|
|
user,
|
2014-10-23 04:24:02 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-12-05 12:48:54 +00:00
|
|
|
(*list)[list_info->index - 1].index = user + 1;
|
|
|
|
(*list)[list_info->index - 1].index_offset = user;
|
2015-03-20 23:56:26 +00:00
|
|
|
(*list)[list_info->index - 1].action_toggle = &setting_action_toggle_analog_dpad_mode;
|
|
|
|
(*list)[list_info->index - 1].action_start = &setting_action_start_analog_dpad_mode;
|
2015-01-30 10:12:59 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation =
|
2015-03-20 23:56:26 +00:00
|
|
|
&setting_get_string_representation_uint_analog_dpad_mode;
|
2014-10-23 04:24:02 +00:00
|
|
|
|
2014-10-24 07:16:50 +00:00
|
|
|
CONFIG_ACTION(
|
2014-12-05 12:48:54 +00:00
|
|
|
key[user],
|
|
|
|
label[user],
|
2014-10-07 21:44:04 +00:00
|
|
|
group_info.name,
|
2014-10-24 07:16:50 +00:00
|
|
|
subgroup_info.name);
|
2014-12-05 12:48:54 +00:00
|
|
|
(*list)[list_info->index - 1].index = user + 1;
|
|
|
|
(*list)[list_info->index - 1].index_offset = user;
|
2015-03-20 23:56:26 +00:00
|
|
|
(*list)[list_info->index - 1].action_start = &setting_action_start_bind_device;
|
|
|
|
(*list)[list_info->index - 1].action_toggle = &setting_action_toggle_bind_device;
|
2014-10-24 07:16:50 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation = &get_string_representation_bind_device;
|
2014-10-23 05:26:04 +00:00
|
|
|
|
|
|
|
CONFIG_ACTION(
|
2014-12-05 12:48:54 +00:00
|
|
|
key_bind_all[user],
|
|
|
|
label_bind_all[user],
|
2014-10-23 05:26:04 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name);
|
2015-01-09 03:43:24 +00:00
|
|
|
(*list)[list_info->index - 1].index = user + 1;
|
|
|
|
(*list)[list_info->index - 1].index_offset = user;
|
2015-03-20 23:56:26 +00:00
|
|
|
(*list)[list_info->index - 1].action_ok = &setting_action_ok_bind_all;
|
2015-01-09 03:43:24 +00:00
|
|
|
(*list)[list_info->index - 1].action_cancel = NULL;
|
2014-10-23 05:26:04 +00:00
|
|
|
|
|
|
|
CONFIG_ACTION(
|
2014-12-05 12:48:54 +00:00
|
|
|
key_bind_defaults[user],
|
|
|
|
label_bind_defaults[user],
|
2014-10-23 05:26:04 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name);
|
2015-01-09 03:43:24 +00:00
|
|
|
(*list)[list_info->index - 1].index = user + 1;
|
|
|
|
(*list)[list_info->index - 1].index_offset = user;
|
2015-03-20 23:56:26 +00:00
|
|
|
(*list)[list_info->index - 1].action_ok = &setting_action_ok_bind_defaults;
|
2015-01-09 03:43:24 +00:00
|
|
|
(*list)[list_info->index - 1].action_cancel = NULL;
|
2014-10-07 21:44:04 +00:00
|
|
|
}
|
2014-10-06 20:15:10 +00:00
|
|
|
|
2014-10-07 13:37:29 +00:00
|
|
|
START_SUB_GROUP(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
"Turbo/Deadzone",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info);
|
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.axis_threshold,
|
2014-10-07 13:37:29 +00:00
|
|
|
"input_axis_threshold",
|
|
|
|
"Input Axis Threshold",
|
|
|
|
axis_threshold,
|
|
|
|
"%.3f",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 0, 1.00, 0.001, true, true);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.turbo_period,
|
2014-10-07 13:37:29 +00:00
|
|
|
"input_turbo_period",
|
|
|
|
"Turbo Period",
|
|
|
|
turbo_period,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 1, 0, 1, true, false);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.turbo_duty_cycle,
|
2014-10-07 13:37:29 +00:00
|
|
|
"input_duty_cycle",
|
|
|
|
"Duty Cycle",
|
|
|
|
turbo_duty_cycle,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 1, 0, 1, true, false);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
|
|
|
|
/* The second argument to config bind is 1
|
2014-12-05 12:48:54 +00:00
|
|
|
* based for users and 0 only for meta keys. */
|
2014-10-07 13:37:29 +00:00
|
|
|
START_SUB_GROUP(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
"Meta Keys",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info);
|
2014-10-06 20:15:10 +00:00
|
|
|
|
2014-10-07 21:38:32 +00:00
|
|
|
for (i = 0; i < RARCH_BIND_LIST_END; i ++)
|
2014-10-06 20:15:10 +00:00
|
|
|
{
|
2014-10-20 20:50:11 +00:00
|
|
|
const struct input_bind_map* keybind = (const struct input_bind_map*)
|
2014-10-07 21:38:32 +00:00
|
|
|
&input_config_bind_map[i];
|
|
|
|
|
2014-10-20 20:50:11 +00:00
|
|
|
if (!keybind || !keybind->meta)
|
2014-10-07 21:38:32 +00:00
|
|
|
continue;
|
|
|
|
|
2015-03-20 20:22:38 +00:00
|
|
|
CONFIG_BIND(settings->input.binds[0][i], 0, 0,
|
2014-10-20 20:50:11 +00:00
|
|
|
keybind->base, keybind->desc, &retro_keybinds_1[i],
|
2014-10-07 21:38:32 +00:00
|
|
|
group_info.name, subgroup_info.name);
|
2014-10-17 06:21:22 +00:00
|
|
|
settings_list_current_add_bind_type(list, list_info, i + MENU_SETTINGS_BIND_BEGIN);
|
2014-10-06 20:15:10 +00:00
|
|
|
}
|
|
|
|
END_SUB_GROUP(list, list_info);
|
2014-07-21 21:03:14 +00:00
|
|
|
|
2015-03-20 20:22:38 +00:00
|
|
|
for (user = 0; user < settings->input.max_users; user++)
|
2014-10-06 20:15:10 +00:00
|
|
|
{
|
2014-10-09 22:46:28 +00:00
|
|
|
/* This constants matches the string length.
|
|
|
|
* Keep it up to date or you'll get some really obvious bugs.
|
2014-12-05 12:48:54 +00:00
|
|
|
* 2 is the length of '99'; we don't need more users than that.
|
2014-10-09 22:46:28 +00:00
|
|
|
*/
|
2015-01-05 00:58:00 +00:00
|
|
|
static char buffer[MAX_USERS][7+2+1];
|
2014-10-06 20:15:10 +00:00
|
|
|
const struct retro_keybind* const defaults =
|
2014-12-05 12:48:54 +00:00
|
|
|
(user == 0) ? retro_keybinds_1 : retro_keybinds_rest;
|
2014-10-07 21:38:32 +00:00
|
|
|
|
2014-12-05 12:48:54 +00:00
|
|
|
snprintf(buffer[user], sizeof(buffer[user]), "User %d", user + 1);
|
2014-10-06 20:13:19 +00:00
|
|
|
|
2014-10-07 21:38:32 +00:00
|
|
|
START_SUB_GROUP(
|
|
|
|
list,
|
|
|
|
list_info,
|
2014-12-05 12:48:54 +00:00
|
|
|
buffer[user],
|
2014-10-07 21:38:32 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info);
|
|
|
|
|
|
|
|
for (i = 0; i < RARCH_BIND_LIST_END; i ++)
|
2014-10-06 20:15:10 +00:00
|
|
|
{
|
2015-01-09 17:04:29 +00:00
|
|
|
char label[PATH_MAX_LENGTH];
|
|
|
|
char name[PATH_MAX_LENGTH];
|
2014-12-05 13:13:29 +00:00
|
|
|
bool do_add = true;
|
2014-10-20 20:50:11 +00:00
|
|
|
const struct input_bind_map* keybind =
|
2014-10-07 21:38:32 +00:00
|
|
|
(const struct input_bind_map*)&input_config_bind_map[i];
|
2014-10-06 20:13:19 +00:00
|
|
|
|
2014-10-20 20:50:11 +00:00
|
|
|
if (!keybind || keybind->meta)
|
2014-10-07 21:38:32 +00:00
|
|
|
continue;
|
|
|
|
|
2014-12-04 12:45:56 +00:00
|
|
|
if (
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.input_descriptor_label_show
|
2014-12-04 13:53:29 +00:00
|
|
|
&& (i < RARCH_FIRST_META_KEY)
|
2015-03-21 04:42:49 +00:00
|
|
|
&& (global->has_set_input_descriptors)
|
2014-12-04 13:53:29 +00:00
|
|
|
&& (i != RARCH_TURBO_ENABLE)
|
2014-12-04 12:45:56 +00:00
|
|
|
)
|
2014-12-05 13:13:29 +00:00
|
|
|
{
|
2015-03-21 04:42:49 +00:00
|
|
|
if (global->system.input_desc_btn[user][i])
|
2014-12-05 13:13:29 +00:00
|
|
|
snprintf(label, sizeof(label), "%s %s", buffer[user],
|
2015-03-21 04:42:49 +00:00
|
|
|
global->system.input_desc_btn[user][i]);
|
2014-12-05 13:13:29 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
snprintf(label, sizeof(label), "%s %s", buffer[user], "N/A");
|
|
|
|
|
2015-03-20 20:22:38 +00:00
|
|
|
if (settings->input.input_descriptor_hide_unbound)
|
2014-12-05 13:13:29 +00:00
|
|
|
do_add = false;
|
|
|
|
}
|
|
|
|
}
|
2014-12-04 12:26:27 +00:00
|
|
|
else
|
2014-12-05 12:48:54 +00:00
|
|
|
snprintf(label, sizeof(label), "%s %s", buffer[user], keybind->desc);
|
2014-12-04 12:26:27 +00:00
|
|
|
|
2014-12-05 12:48:54 +00:00
|
|
|
snprintf(name, sizeof(name), "p%u_%s", user + 1, keybind->base);
|
2014-10-07 21:50:09 +00:00
|
|
|
|
2014-12-05 13:13:29 +00:00
|
|
|
if (do_add)
|
|
|
|
{
|
|
|
|
CONFIG_BIND(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.binds[user][i],
|
2014-12-05 13:13:29 +00:00
|
|
|
user + 1,
|
|
|
|
user,
|
|
|
|
strdup(name), /* TODO: Find a way to fix these memleaks. */
|
|
|
|
strdup(label),
|
|
|
|
&defaults[i],
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name);
|
|
|
|
settings_list_current_add_bind_type(list, list_info, i + MENU_SETTINGS_BIND_BEGIN);
|
|
|
|
}
|
2014-10-06 20:13:19 +00:00
|
|
|
}
|
|
|
|
END_SUB_GROUP(list, list_info);
|
2014-10-06 20:15:10 +00:00
|
|
|
}
|
2014-10-06 20:13:19 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_GROUP(list, list_info);
|
2013-11-22 14:30:02 +00:00
|
|
|
|
2014-10-06 23:53:14 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_overlay_options(
|
2014-10-06 23:53:14 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
|
|
|
{
|
2014-04-26 01:14:53 +00:00
|
|
|
#ifdef HAVE_OVERLAY
|
2014-10-06 23:53:14 +00:00
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-03-21 04:42:49 +00:00
|
|
|
global_t *global = global_get_ptr();
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "Overlay Settings");
|
2014-10-06 20:15:10 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-12-29 09:16:44 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.overlay_enable,
|
2014-12-29 09:16:44 +00:00
|
|
|
"input_overlay_enable",
|
|
|
|
"Overlay Enable",
|
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-01-13 02:32:43 +00:00
|
|
|
(*list)[list_info->index - 1].change_handler = overlay_enable_toggle_change_handler;
|
2014-12-29 09:16:44 +00:00
|
|
|
|
2014-10-07 13:37:29 +00:00
|
|
|
CONFIG_PATH(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.overlay,
|
2014-10-07 13:37:29 +00:00
|
|
|
"input_overlay",
|
|
|
|
"Overlay Preset",
|
2015-03-21 04:42:49 +00:00
|
|
|
global->overlay_dir,
|
2014-10-07 13:37:29 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_values(list, list_info, "cfg");
|
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_OVERLAY_INIT);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.overlay_opacity,
|
2014-10-07 13:37:29 +00:00
|
|
|
"input_overlay_opacity",
|
|
|
|
"Overlay Opacity",
|
|
|
|
0.7f,
|
|
|
|
"%.2f",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_OVERLAY_SET_ALPHA_MOD);
|
|
|
|
settings_list_current_add_range(list, list_info, 0, 1, 0.01, true, true);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_FLOAT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.overlay_scale,
|
2014-10-07 13:37:29 +00:00
|
|
|
"input_overlay_scale",
|
|
|
|
"Overlay Scale",
|
|
|
|
1.0f,
|
|
|
|
"%.2f",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_OVERLAY_SET_SCALE_FACTOR);
|
|
|
|
settings_list_current_add_range(list, list_info, 0, 2, 0.01, true, true);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
END_GROUP(list, list_info);
|
2014-04-26 01:14:53 +00:00
|
|
|
#endif
|
2013-11-22 14:30:02 +00:00
|
|
|
|
2014-10-06 23:53:14 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_osk_overlay_options(
|
2015-01-29 19:33:27 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
|
|
|
{
|
|
|
|
#ifdef HAVE_OVERLAY
|
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-03-21 04:42:49 +00:00
|
|
|
global_t *global = global_get_ptr();
|
2015-01-29 19:33:27 +00:00
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "Onscreen Keyboard Overlay Settings");
|
2015-01-29 19:33:27 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->osk.enable,
|
2015-01-29 19:33:27 +00:00
|
|
|
"input_osk_overlay_enable",
|
|
|
|
"OSK Overlay Enable",
|
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_PATH(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->osk.overlay,
|
2015-01-29 19:33:27 +00:00
|
|
|
"input_osk_overlay",
|
|
|
|
"OSK Overlay Preset",
|
2015-03-21 04:42:49 +00:00
|
|
|
global->osk_overlay_dir,
|
2015-01-29 19:33:27 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_list_current_add_values(list, list_info, "cfg");
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
|
|
|
|
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
END_GROUP(list, list_info);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_menu_options(
|
2014-10-06 23:53:14 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
|
|
|
{
|
2014-09-29 12:19:40 +00:00
|
|
|
#ifdef HAVE_MENU
|
2014-10-06 23:53:14 +00:00
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "Menu Settings");
|
2014-10-06 20:15:10 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2015-01-17 17:15:22 +00:00
|
|
|
CONFIG_PATH(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->menu.wallpaper,
|
2015-01-17 17:15:22 +00:00
|
|
|
"menu_wallpaper",
|
|
|
|
"Menu Wallpaper",
|
|
|
|
"",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_list_current_add_values(list, list_info, "png");
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
|
|
|
|
2014-10-07 13:37:29 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->menu.pause_libretro,
|
2014-10-07 13:37:29 +00:00
|
|
|
"menu_pause_libretro",
|
|
|
|
"Pause Libretro",
|
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_MENU_PAUSE_LIBRETRO);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
2014-10-26 17:06:57 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->menu.mouse.enable,
|
2014-10-26 17:06:57 +00:00
|
|
|
"menu_mouse_enable",
|
|
|
|
"Mouse Enable",
|
|
|
|
false,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
2014-11-17 15:16:52 +00:00
|
|
|
|
|
|
|
START_SUB_GROUP(list, list_info, "Navigation", group_info.name, subgroup_info);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->menu.navigation.wraparound.horizontal_enable,
|
2014-11-17 15:16:52 +00:00
|
|
|
"menu_navigation_wraparound_horizontal_enable",
|
|
|
|
"Navigation Wrap-Around Horizontal",
|
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->menu.navigation.wraparound.vertical_enable,
|
2014-11-17 15:16:52 +00:00
|
|
|
"menu_navigation_wraparound_vertical_enable",
|
|
|
|
"Navigation Wrap-Around Vertical",
|
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
|
2015-01-30 04:58:57 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Settings View", group_info.name, subgroup_info);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->menu.collapse_subgroups_enable,
|
2015-01-30 04:58:57 +00:00
|
|
|
"menu_collapse_subgroups_enable",
|
|
|
|
"Collapse SubGroups",
|
2015-02-26 02:12:35 +00:00
|
|
|
collapse_subgroups_enable,
|
2015-01-30 04:58:57 +00:00
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->menu.show_advanced_settings,
|
2015-03-06 16:09:48 +00:00
|
|
|
"menu_show_advanced_settings",
|
|
|
|
"Show advanced settings",
|
|
|
|
show_advanced_settings,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-01-30 04:58:57 +00:00
|
|
|
|
2015-03-18 20:33:04 +00:00
|
|
|
#ifdef HAVE_THREADS
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->menu.threaded_data_runloop_enable,
|
2015-03-18 20:33:04 +00:00
|
|
|
"threaded_data_runloop_enable",
|
|
|
|
"Threaded data runloop",
|
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
#endif
|
|
|
|
|
2015-03-14 22:44:27 +00:00
|
|
|
/* These colors are hints. The menu driver is not required to use them. */
|
2015-03-14 22:21:55 +00:00
|
|
|
CONFIG_HEX(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->menu.entry_normal_color,
|
2015-03-14 22:21:55 +00:00
|
|
|
"menu_entry_normal_color",
|
|
|
|
"Menu entry normal color",
|
2015-03-15 16:02:07 +00:00
|
|
|
menu_entry_normal_color,
|
2015-03-14 22:21:55 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
|
|
|
|
|
|
|
CONFIG_HEX(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->menu.entry_hover_color,
|
2015-03-14 22:21:55 +00:00
|
|
|
"menu_entry_hover_color",
|
|
|
|
"Menu entry hover color",
|
|
|
|
menu_entry_hover_color,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
|
|
|
|
|
|
|
CONFIG_HEX(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->menu.title_color,
|
2015-03-14 22:21:55 +00:00
|
|
|
"menu_title_color",
|
|
|
|
"Menu title color",
|
|
|
|
menu_title_color,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
|
|
|
|
2015-01-30 04:58:57 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
|
2015-01-01 15:40:21 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Browser", group_info.name, subgroup_info);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->menu.navigation.browser.filter.supported_extensions_enable,
|
2015-01-01 15:40:21 +00:00
|
|
|
"menu_navigation_browser_filter_supported_extensions_enable",
|
2015-01-05 14:51:34 +00:00
|
|
|
"Browser - Filter by supported extensions",
|
2015-01-01 15:40:21 +00:00
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
2015-01-17 03:50:46 +00:00
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-02-13 03:46:34 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->menu_show_start_screen,
|
2015-02-13 03:46:34 +00:00
|
|
|
"rgui_show_start_screen",
|
|
|
|
"Show Start Screen",
|
|
|
|
menu_show_start_screen,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-01-17 03:50:46 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->menu.timedate_enable,
|
2015-01-17 03:50:46 +00:00
|
|
|
"menu_timedate_enable",
|
2015-02-13 03:46:34 +00:00
|
|
|
"Show time / date",
|
2015-01-17 03:50:46 +00:00
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
2015-01-01 15:40:21 +00:00
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-02-12 18:15:48 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->menu.core_enable,
|
2015-02-12 18:15:48 +00:00
|
|
|
"menu_core_enable",
|
2015-02-13 03:46:34 +00:00
|
|
|
"Show core name",
|
2015-02-12 18:15:48 +00:00
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-02-03 02:25:29 +00:00
|
|
|
|
2015-01-01 15:40:21 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_GROUP(list, list_info);
|
2014-09-29 12:19:40 +00:00
|
|
|
#endif
|
|
|
|
|
2014-10-06 23:53:14 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_ui_options(
|
2015-01-16 15:15:58 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
|
|
|
{
|
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-01-16 15:15:58 +00:00
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "UI Settings");
|
2015-01-16 15:15:58 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.disable_composition,
|
2015-01-16 15:15:58 +00:00
|
|
|
"video_disable_composition",
|
2015-01-17 00:29:15 +00:00
|
|
|
"Window Compositing Disable Hint",
|
2015-01-16 15:15:58 +00:00
|
|
|
disable_composition,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_REINIT);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_CMD_APPLY_AUTO);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->pause_nonactive,
|
2015-01-16 15:15:58 +00:00
|
|
|
"pause_nonactive",
|
2015-01-17 00:29:15 +00:00
|
|
|
"Window Unfocus Pause Hint",
|
2015-01-16 15:15:58 +00:00
|
|
|
pause_nonactive,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-01-17 00:29:15 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->ui.menubar_enable,
|
2015-01-17 00:29:15 +00:00
|
|
|
"ui_menubar_enable",
|
|
|
|
"Menubar Enable Hint",
|
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-01-18 21:37:22 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->ui.suspend_screensaver_enable,
|
2015-01-18 21:37:22 +00:00
|
|
|
"suspend_screensaver_enable",
|
|
|
|
"Suspend Screensaver Enable Hint",
|
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-01-16 15:15:58 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
|
|
|
|
END_GROUP(list, list_info);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_archive_options(
|
2014-11-14 13:54:20 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
|
|
|
{
|
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2014-11-14 13:54:20 +00:00
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "Archive Settings");
|
2014-11-14 13:54:20 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info);
|
|
|
|
|
2014-11-14 14:58:49 +00:00
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->archive.mode,
|
2014-11-14 14:58:49 +00:00
|
|
|
"archive_mode",
|
|
|
|
"Archive Mode",
|
|
|
|
0,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_list_current_add_range(list, list_info, 0, 2, 1, true, true);
|
2015-01-30 10:12:59 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation =
|
2015-03-20 23:56:26 +00:00
|
|
|
&setting_get_string_representation_uint_archive_mode;
|
2014-11-14 14:58:49 +00:00
|
|
|
|
2014-11-14 13:54:20 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
END_GROUP(list, list_info);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_core_updater_options(
|
2014-10-06 23:53:14 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
|
|
|
{
|
2015-01-28 07:55:02 +00:00
|
|
|
#ifdef HAVE_NETWORKING
|
2014-10-06 23:53:14 +00:00
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "Core Updater Settings");
|
2015-01-19 03:09:28 +00:00
|
|
|
|
2015-01-22 03:05:10 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info);
|
2015-01-19 03:09:28 +00:00
|
|
|
|
|
|
|
CONFIG_STRING(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->network.buildbot_url,
|
2015-01-31 11:45:20 +00:00
|
|
|
"core_updater_buildbot_url",
|
2015-02-01 16:13:15 +00:00
|
|
|
"Buildbot Core URL",
|
2015-01-21 05:28:40 +00:00
|
|
|
buildbot_server_url,
|
2015-01-19 03:09:28 +00:00
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
|
|
|
|
2015-02-01 16:13:15 +00:00
|
|
|
CONFIG_STRING(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->network.buildbot_assets_url,
|
2015-02-01 16:13:15 +00:00
|
|
|
"core_updater_buildbot_assets_url",
|
|
|
|
"Buildbot Assets URL",
|
|
|
|
buildbot_assets_server_url,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
|
|
|
|
2015-01-31 11:45:20 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->network.buildbot_auto_extract_archive,
|
2015-01-31 11:45:20 +00:00
|
|
|
"core_updater_auto_extract_archive",
|
|
|
|
"Automatically extract downloaded archive",
|
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-01-19 03:09:28 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
2015-01-22 03:05:10 +00:00
|
|
|
END_GROUP(list, list_info);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_netplay_options(
|
2015-01-22 03:05:10 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
|
|
|
{
|
|
|
|
#ifdef HAVE_NETPLAY
|
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-03-21 04:42:49 +00:00
|
|
|
global_t *global = global_get_ptr();
|
2015-01-22 03:05:10 +00:00
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "Network Settings");
|
2015-01-19 03:09:28 +00:00
|
|
|
|
2014-12-20 21:44:06 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Netplay", group_info.name, subgroup_info);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->netplay_enable,
|
2014-10-07 13:37:29 +00:00
|
|
|
"netplay_enable",
|
|
|
|
"Netplay Enable",
|
|
|
|
false,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2015-03-06 17:35:14 +00:00
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.netplay_client_swap_input,
|
2015-03-06 17:35:14 +00:00
|
|
|
"netplay_client_swap_input",
|
|
|
|
"Swap Netplay Input",
|
|
|
|
netplay_client_swap_input,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-01-19 03:09:28 +00:00
|
|
|
|
2014-10-07 13:37:29 +00:00
|
|
|
CONFIG_STRING(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->netplay_server,
|
2014-10-07 13:37:29 +00:00
|
|
|
"netplay_ip_address",
|
|
|
|
"IP Address",
|
|
|
|
"",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->netplay_is_client,
|
2014-10-07 13:37:29 +00:00
|
|
|
"netplay_mode",
|
|
|
|
"Netplay Client Enable",
|
|
|
|
false,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->netplay_is_spectate,
|
2014-10-07 13:37:29 +00:00
|
|
|
"netplay_spectator_mode_enable",
|
|
|
|
"Netplay Spectator Enable",
|
|
|
|
false,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->netplay_sync_frames,
|
2014-10-07 13:37:29 +00:00
|
|
|
"netplay_delay_frames",
|
|
|
|
"Netplay Delay Frames",
|
|
|
|
0,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 0, 10, 1, true, false);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->netplay_port,
|
2014-10-07 13:37:29 +00:00
|
|
|
"netplay_tcp_udp_port",
|
|
|
|
"Netplay TCP/UDP Port",
|
|
|
|
RARCH_DEFAULT_PORT,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(list, list_info, 1, 99999, 1, true, true);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-12-20 23:51:34 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
|
|
|
|
START_SUB_GROUP(
|
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
"Miscellaneous",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info);
|
|
|
|
|
2015-03-06 17:35:14 +00:00
|
|
|
|
2014-12-20 23:51:34 +00:00
|
|
|
#if defined(HAVE_NETWORK_CMD)
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->network_cmd_enable,
|
2014-12-20 23:51:34 +00:00
|
|
|
"network_cmd_enable",
|
|
|
|
"Network Commands",
|
|
|
|
network_cmd_enable,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-12-20 23:51:34 +00:00
|
|
|
#if 0
|
|
|
|
CONFIG_INT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->network_cmd_port,
|
2014-12-20 23:51:34 +00:00
|
|
|
"network_cmd_port",
|
|
|
|
"Network Command Port",
|
|
|
|
network_cmd_port,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
NULL);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-12-20 23:51:34 +00:00
|
|
|
#endif
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->stdin_cmd_enable,
|
2014-12-20 23:51:34 +00:00
|
|
|
"stdin_cmd_enable",
|
|
|
|
"stdin command",
|
|
|
|
stdin_cmd_enable,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2015-03-06 16:09:48 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
2014-12-20 23:51:34 +00:00
|
|
|
#endif
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
END_GROUP(list, list_info);
|
2014-08-01 03:04:59 +00:00
|
|
|
#endif
|
2014-08-01 05:00:32 +00:00
|
|
|
|
2014-10-06 23:53:14 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-06 15:26:04 +00:00
|
|
|
#if 0
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_patch_options(
|
2015-01-13 02:13:19 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
|
|
|
{
|
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "Patch Settings");
|
2015-01-13 02:13:19 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->ups_pref,
|
2015-01-13 02:13:19 +00:00
|
|
|
"ups_pref",
|
|
|
|
"UPS Patching Enable",
|
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->bps_pref,
|
2015-01-13 02:13:19 +00:00
|
|
|
"bps_pref",
|
|
|
|
"BPS Patching Enable",
|
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->ips_pref,
|
2015-01-13 02:13:19 +00:00
|
|
|
"ips_pref",
|
|
|
|
"IPS Patching Enable",
|
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
END_GROUP(list, list_info);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
2015-03-06 15:26:04 +00:00
|
|
|
#endif
|
2015-01-13 02:13:19 +00:00
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_playlist_options(
|
2014-10-17 02:23:50 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
|
|
|
{
|
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2014-10-17 02:23:50 +00:00
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "Playlist Settings");
|
2014-10-17 02:27:12 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "History", group_info.name, subgroup_info);
|
2014-10-17 02:23:50 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->history_list_enable,
|
2014-10-17 02:23:50 +00:00
|
|
|
"history_list_enable",
|
|
|
|
"History List Enable",
|
|
|
|
true,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
2014-10-17 02:27:12 +00:00
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->content_history_size,
|
2014-10-17 02:27:12 +00:00
|
|
|
"game_history_size",
|
|
|
|
"History List Size",
|
|
|
|
default_content_history_size,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
settings_list_current_add_range(list, list_info, 0, 0, 1.0, true, false);
|
|
|
|
|
2014-10-17 02:23:50 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
END_GROUP(list, list_info);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_user_options(
|
2014-10-06 23:53:14 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
|
|
|
{
|
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "User Settings");
|
2014-10-06 20:15:10 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_STRING(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->username,
|
2014-10-07 13:37:29 +00:00
|
|
|
"netplay_nickname",
|
|
|
|
"Username",
|
|
|
|
"",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_UINT(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->user_language,
|
2014-10-07 13:37:29 +00:00
|
|
|
"user_language",
|
|
|
|
"Language",
|
|
|
|
def_user_language,
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_range(
|
2014-10-07 13:37:29 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
|
|
|
0,
|
|
|
|
RETRO_LANGUAGE_LAST-1,
|
|
|
|
1,
|
|
|
|
true,
|
|
|
|
true);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT);
|
2015-01-30 10:25:58 +00:00
|
|
|
(*list)[list_info->index - 1].get_string_representation =
|
2015-03-20 23:56:26 +00:00
|
|
|
&setting_get_string_representation_uint_user_language;
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
END_GROUP(list, list_info);
|
|
|
|
|
2014-10-06 23:53:14 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_path_options(
|
2014-10-06 23:53:14 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
|
|
|
{
|
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-03-21 04:42:49 +00:00
|
|
|
global_t *global = global_get_ptr();
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "Path Settings");
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-06 20:15:10 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "Paths", group_info.name, subgroup_info);
|
2014-07-12 14:13:57 +00:00
|
|
|
#ifdef HAVE_MENU
|
2014-10-07 13:37:29 +00:00
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->menu_content_directory,
|
2014-10-07 13:37:29 +00:00
|
|
|
"rgui_browser_directory",
|
|
|
|
"Browser Directory",
|
|
|
|
"",
|
|
|
|
"<default>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(
|
2014-10-07 13:37:29 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->core_assets_directory,
|
2015-03-16 01:59:30 +00:00
|
|
|
"core_assets_directory",
|
|
|
|
"Core Assets Directory",
|
2014-10-07 13:37:29 +00:00
|
|
|
"",
|
|
|
|
"<default>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(
|
2014-10-07 13:37:29 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->assets_directory,
|
2014-10-07 13:37:29 +00:00
|
|
|
"assets_directory",
|
|
|
|
"Assets Directory",
|
|
|
|
"",
|
|
|
|
"<default>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(
|
2014-10-07 13:37:29 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->menu_config_directory,
|
2014-10-07 13:37:29 +00:00
|
|
|
"rgui_config_directory",
|
|
|
|
"Config Directory",
|
|
|
|
"",
|
|
|
|
"<default>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(
|
2014-10-07 13:37:29 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2014-07-16 04:44:12 +00:00
|
|
|
|
2014-07-12 14:13:57 +00:00
|
|
|
#endif
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-07 14:05:13 +00:00
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->libretro_directory,
|
2014-10-07 14:05:13 +00:00
|
|
|
"libretro_dir_path",
|
|
|
|
"Core Directory",
|
|
|
|
g_defaults.core_dir,
|
|
|
|
"<None>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_CORE_INFO_INIT);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(
|
2014-10-07 14:05:13 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-07 14:05:13 +00:00
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->libretro_info_path,
|
2014-10-07 14:05:13 +00:00
|
|
|
"libretro_info_path",
|
|
|
|
"Core Info Directory",
|
|
|
|
g_defaults.core_info_dir,
|
|
|
|
"<None>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_list_current_add_cmd(list, list_info, RARCH_CMD_CORE_INFO_INIT);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(
|
2014-10-07 14:05:13 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2015-01-22 02:58:04 +00:00
|
|
|
#ifdef HAVE_LIBRETRODB
|
2014-12-30 21:58:08 +00:00
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->content_database,
|
2014-12-30 21:58:08 +00:00
|
|
|
"content_database_path",
|
|
|
|
"Content Database Directory",
|
2014-10-07 14:05:13 +00:00
|
|
|
"",
|
2014-12-30 21:58:08 +00:00
|
|
|
"<None>",
|
|
|
|
group_info.name,
|
2014-10-07 14:05:13 +00:00
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-12-30 21:58:08 +00:00
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2015-01-25 08:50:09 +00:00
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->cursor_directory,
|
2015-01-25 08:50:09 +00:00
|
|
|
"cursor_directory",
|
|
|
|
"Cursor Directory",
|
|
|
|
"",
|
|
|
|
"<None>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
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-01-22 02:58:04 +00:00
|
|
|
#endif
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-12-15 05:42:24 +00:00
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->cheat_database,
|
2014-10-07 14:05:13 +00:00
|
|
|
"cheat_database_path",
|
2014-12-15 05:37:14 +00:00
|
|
|
"Cheat Database Directory",
|
2014-10-07 14:05:13 +00:00
|
|
|
"",
|
2014-12-15 05:42:24 +00:00
|
|
|
"<None>",
|
|
|
|
group_info.name,
|
2014-10-07 14:05:13 +00:00
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-12-15 05:42:24 +00:00
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-07 14:05:13 +00:00
|
|
|
CONFIG_PATH(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->content_history_path,
|
2014-10-07 14:05:13 +00:00
|
|
|
"game_history_path",
|
|
|
|
"Content History Path",
|
|
|
|
"",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
2014-10-06 20:15:10 +00:00
|
|
|
|
2014-10-07 14:05:13 +00:00
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.filter_dir,
|
2014-10-07 14:05:13 +00:00
|
|
|
"video_filter_dir",
|
|
|
|
"VideoFilter Directory",
|
|
|
|
"",
|
|
|
|
"<default>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(
|
2014-10-07 14:05:13 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-07 14:05:13 +00:00
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->audio.filter_dir,
|
2014-10-07 14:05:13 +00:00
|
|
|
"audio_filter_dir",
|
|
|
|
"AudioFilter Directory",
|
|
|
|
"",
|
|
|
|
"<default>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(
|
2014-10-07 14:05:13 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-07 14:05:13 +00:00
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.shader_dir,
|
2014-10-07 14:05:13 +00:00
|
|
|
"video_shader_dir",
|
|
|
|
"Shader Directory",
|
|
|
|
g_defaults.shader_dir,
|
|
|
|
"<default>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(
|
2014-10-07 14:05:13 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2014-07-12 14:13:57 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_OVERLAY
|
2014-10-07 14:05:13 +00:00
|
|
|
CONFIG_DIR(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->overlay_dir,
|
2014-10-07 14:05:13 +00:00
|
|
|
"overlay_directory",
|
|
|
|
"Overlay Directory",
|
|
|
|
g_defaults.overlay_dir,
|
|
|
|
"<default>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(
|
2014-10-07 14:05:13 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2015-01-29 19:33:27 +00:00
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->osk_overlay_dir,
|
2015-01-29 19:33:27 +00:00
|
|
|
"osk_overlay_directory",
|
|
|
|
"OSK Overlay Directory",
|
|
|
|
g_defaults.osk_overlay_dir,
|
|
|
|
"<default>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
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);
|
2014-07-12 14:13:57 +00:00
|
|
|
#endif
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-07 14:05:13 +00:00
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->screenshot_directory,
|
2014-10-07 14:05:13 +00:00
|
|
|
"screenshot_directory",
|
|
|
|
"Screenshot Directory",
|
|
|
|
"",
|
|
|
|
"<Content dir>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(
|
2014-10-07 14:05:13 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-07 14:05:13 +00:00
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.autoconfig_dir,
|
2014-10-07 14:05:13 +00:00
|
|
|
"joypad_autoconfig_dir",
|
|
|
|
"Joypad Autoconfig Directory",
|
|
|
|
"",
|
|
|
|
"<default>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(
|
2014-10-07 14:05:13 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2015-01-19 06:24:12 +00:00
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input_remapping_directory,
|
2015-01-19 06:24:12 +00:00
|
|
|
"input_remapping_directory",
|
|
|
|
"Input Remapping Directory",
|
|
|
|
"",
|
|
|
|
"<None>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
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);
|
|
|
|
|
2014-10-07 14:05:13 +00:00
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->playlist_directory,
|
2014-10-07 14:05:13 +00:00
|
|
|
"playlist_directory",
|
|
|
|
"Playlist Directory",
|
|
|
|
"",
|
|
|
|
"<default>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-14 22:47:38 +00:00
|
|
|
settings_data_list_current_add_flags(
|
2014-10-07 14:05:13 +00:00
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-07 14:05:13 +00:00
|
|
|
CONFIG_DIR(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->savefile_dir,
|
2014-10-07 14:05:13 +00:00
|
|
|
"savefile_directory",
|
|
|
|
"Savefile Directory",
|
|
|
|
"",
|
|
|
|
"<Content dir>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-12-28 04:05:01 +00:00
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
2014-10-07 14:05:13 +00:00
|
|
|
CONFIG_DIR(
|
2015-03-21 04:42:49 +00:00
|
|
|
global->savestate_dir,
|
2014-10-07 14:05:13 +00:00
|
|
|
"savestate_directory",
|
|
|
|
"Savestate Directory",
|
|
|
|
"",
|
|
|
|
"<Content dir>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-12-28 04:05:01 +00:00
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->system_directory,
|
2014-10-07 13:37:29 +00:00
|
|
|
"system_directory",
|
|
|
|
"System Directory",
|
|
|
|
"",
|
|
|
|
"<Content dir>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-12-28 04:05:01 +00:00
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_DIR(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->extraction_directory,
|
2014-10-07 13:37:29 +00:00
|
|
|
"extraction_directory",
|
|
|
|
"Extraction Directory",
|
|
|
|
"",
|
|
|
|
"<None>",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-12-28 04:05:01 +00:00
|
|
|
settings_data_list_current_add_flags(
|
|
|
|
list,
|
|
|
|
list_info,
|
2015-01-07 00:38:06 +00:00
|
|
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION);
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
END_GROUP(list, list_info);
|
|
|
|
|
2014-10-06 23:53:14 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-03-20 23:56:26 +00:00
|
|
|
static bool setting_append_list_privacy_options(
|
2014-10-06 23:53:14 +00:00
|
|
|
rarch_setting_t **list,
|
|
|
|
rarch_setting_info_t *list_info)
|
|
|
|
{
|
|
|
|
rarch_setting_group_info_t group_info;
|
|
|
|
rarch_setting_group_info_t subgroup_info;
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2015-02-12 18:52:57 +00:00
|
|
|
START_GROUP(group_info, "Privacy Settings");
|
2014-10-06 20:15:10 +00:00
|
|
|
START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info);
|
2014-10-07 13:37:29 +00:00
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->camera.allow,
|
2014-10-07 13:37:29 +00:00
|
|
|
"camera_allow",
|
|
|
|
"Allow Camera",
|
|
|
|
false,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
|
|
|
|
|
|
|
CONFIG_BOOL(
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->location.allow,
|
2014-10-07 13:37:29 +00:00
|
|
|
"location_allow",
|
|
|
|
"Allow Location",
|
|
|
|
false,
|
|
|
|
"OFF",
|
|
|
|
"ON",
|
|
|
|
group_info.name,
|
|
|
|
subgroup_info.name,
|
|
|
|
general_write_handler,
|
|
|
|
general_read_handler);
|
2014-10-06 20:15:10 +00:00
|
|
|
END_SUB_GROUP(list, list_info);
|
|
|
|
END_GROUP(list, list_info);
|
|
|
|
|
2014-10-06 23:53:14 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2014-10-14 22:47:38 +00:00
|
|
|
|
2015-01-09 15:45:58 +00:00
|
|
|
/**
|
2015-03-20 23:56:26 +00:00
|
|
|
* setting_new:
|
2015-01-09 15:45:58 +00:00
|
|
|
* @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.
|
|
|
|
**/
|
2015-03-20 23:56:26 +00:00
|
|
|
rarch_setting_t *setting_new(unsigned mask)
|
2014-10-06 23:53:14 +00:00
|
|
|
{
|
2014-10-10 17:03:37 +00:00
|
|
|
rarch_setting_t terminator = { ST_NONE };
|
2014-10-08 22:53:13 +00:00
|
|
|
rarch_setting_t* list = NULL;
|
2014-10-28 00:18:15 +00:00
|
|
|
rarch_setting_t* resized_list = NULL;
|
2014-10-08 22:50:35 +00:00
|
|
|
rarch_setting_info_t *list_info = (rarch_setting_info_t*)
|
|
|
|
settings_info_list_new();
|
2014-10-06 23:53:14 +00:00
|
|
|
if (!list_info)
|
|
|
|
return NULL;
|
|
|
|
|
2014-10-07 14:48:24 +00:00
|
|
|
list = (rarch_setting_t*)settings_list_new(list_info->size);
|
2014-10-06 23:53:14 +00:00
|
|
|
if (!list)
|
|
|
|
goto error;
|
|
|
|
|
2014-10-08 00:13:07 +00:00
|
|
|
if (mask & SL_FLAG_MAIN_MENU)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_main_menu_options(&list, list_info))
|
2014-10-08 00:13:07 +00:00
|
|
|
goto error;
|
|
|
|
}
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2014-10-08 00:13:07 +00:00
|
|
|
if (mask & SL_FLAG_DRIVER_OPTIONS)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_driver_options(&list, list_info))
|
2014-10-08 00:13:07 +00:00
|
|
|
goto error;
|
|
|
|
}
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2014-10-08 00:13:07 +00:00
|
|
|
if (mask & SL_FLAG_GENERAL_OPTIONS)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_general_options(&list, list_info))
|
2014-10-08 00:13:07 +00:00
|
|
|
goto error;
|
|
|
|
}
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2014-10-08 00:13:07 +00:00
|
|
|
if (mask & SL_FLAG_GENERAL_OPTIONS)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_video_options(&list, list_info))
|
2014-10-08 00:13:07 +00:00
|
|
|
goto error;
|
|
|
|
}
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2014-10-08 00:13:07 +00:00
|
|
|
if (mask & SL_FLAG_FONT_OPTIONS)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_font_options(&list, list_info))
|
2014-10-08 00:13:07 +00:00
|
|
|
goto error;
|
|
|
|
}
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2014-10-08 00:13:07 +00:00
|
|
|
if (mask & SL_FLAG_AUDIO_OPTIONS)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_audio_options(&list, list_info))
|
2014-10-08 00:13:07 +00:00
|
|
|
goto error;
|
|
|
|
}
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2014-10-08 00:13:07 +00:00
|
|
|
if (mask & SL_FLAG_INPUT_OPTIONS)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_input_options(&list, list_info))
|
2014-10-08 00:13:07 +00:00
|
|
|
goto error;
|
|
|
|
}
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2014-10-08 00:13:07 +00:00
|
|
|
if (mask & SL_FLAG_OVERLAY_OPTIONS)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_overlay_options(&list, list_info))
|
2014-10-08 00:13:07 +00:00
|
|
|
goto error;
|
|
|
|
}
|
2015-01-29 19:33:27 +00:00
|
|
|
|
|
|
|
if (mask & SL_FLAG_OSK_OVERLAY_OPTIONS)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_osk_overlay_options(&list, list_info))
|
2015-01-29 19:33:27 +00:00
|
|
|
goto error;
|
|
|
|
}
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2014-10-08 00:13:07 +00:00
|
|
|
if (mask & SL_FLAG_MENU_OPTIONS)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_menu_options(&list, list_info))
|
2014-10-08 00:13:07 +00:00
|
|
|
goto error;
|
2014-10-17 02:23:50 +00:00
|
|
|
}
|
|
|
|
|
2015-01-16 15:15:58 +00:00
|
|
|
if (mask & SL_FLAG_UI_OPTIONS)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_ui_options(&list, list_info))
|
2015-01-16 15:15:58 +00:00
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
2015-03-06 15:26:04 +00:00
|
|
|
#if 0
|
2015-01-13 02:13:19 +00:00
|
|
|
if (mask & SL_FLAG_PATCH_OPTIONS)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_patch_options(&list, list_info))
|
2015-01-13 02:13:19 +00:00
|
|
|
goto error;
|
|
|
|
}
|
2015-03-06 15:26:04 +00:00
|
|
|
#endif
|
2015-01-13 02:13:19 +00:00
|
|
|
|
2014-10-17 02:23:50 +00:00
|
|
|
if (mask & SL_FLAG_PLAYLIST_OPTIONS)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_playlist_options(&list, list_info))
|
2014-10-17 02:23:50 +00:00
|
|
|
goto error;
|
2014-10-08 00:13:07 +00:00
|
|
|
}
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2015-02-01 14:57:25 +00:00
|
|
|
if (mask & SL_FLAG_CORE_UPDATER_OPTIONS)
|
2015-01-22 03:05:10 +00:00
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_core_updater_options(&list, list_info))
|
2015-01-22 03:05:10 +00:00
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
2014-10-08 00:13:07 +00:00
|
|
|
if (mask & SL_FLAG_NETPLAY_OPTIONS)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_netplay_options(&list, list_info))
|
2014-10-08 00:13:07 +00:00
|
|
|
goto error;
|
|
|
|
}
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2014-11-14 13:54:20 +00:00
|
|
|
if (mask & SL_FLAG_ARCHIVE_OPTIONS)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_archive_options(&list, list_info))
|
2014-11-14 13:54:20 +00:00
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
2014-10-08 00:13:07 +00:00
|
|
|
if (mask & SL_FLAG_USER_OPTIONS)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_user_options(&list, list_info))
|
2014-10-08 00:13:07 +00:00
|
|
|
goto error;
|
|
|
|
}
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2014-10-08 00:13:07 +00:00
|
|
|
if (mask & SL_FLAG_PATH_OPTIONS)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_path_options(&list, list_info))
|
2014-10-08 00:13:07 +00:00
|
|
|
goto error;
|
|
|
|
}
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2014-10-08 00:13:07 +00:00
|
|
|
if (mask & SL_FLAG_PRIVACY_OPTIONS)
|
|
|
|
{
|
2015-03-20 23:56:26 +00:00
|
|
|
if (!setting_append_list_privacy_options(&list, list_info))
|
2014-10-08 00:13:07 +00:00
|
|
|
goto error;
|
|
|
|
}
|
2014-10-06 23:53:14 +00:00
|
|
|
|
2014-10-07 14:48:24 +00:00
|
|
|
if (!(settings_list_append(&list, list_info, terminator)))
|
2014-10-06 17:51:55 +00:00
|
|
|
goto error;
|
2014-08-27 18:42:22 +00:00
|
|
|
|
2014-09-09 15:20:15 +00:00
|
|
|
/* flatten this array to save ourselves some kilobytes. */
|
2014-10-28 00:18:15 +00:00
|
|
|
resized_list = (rarch_setting_t*) realloc(list, list_info->index * sizeof(rarch_setting_t));
|
|
|
|
if (resized_list)
|
|
|
|
list = resized_list;
|
|
|
|
else
|
2014-10-06 13:51:22 +00:00
|
|
|
goto error;
|
|
|
|
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_info_list_free(list_info);
|
2014-09-09 15:20:15 +00:00
|
|
|
|
2014-10-08 22:50:35 +00:00
|
|
|
return list;
|
2014-10-06 13:51:22 +00:00
|
|
|
|
|
|
|
error:
|
|
|
|
RARCH_ERR("Allocation failed.\n");
|
2014-10-07 14:48:24 +00:00
|
|
|
settings_info_list_free(list_info);
|
|
|
|
settings_list_free(list);
|
2014-10-06 13:51:22 +00:00
|
|
|
|
|
|
|
return NULL;
|
2013-11-22 14:30:02 +00:00
|
|
|
}
|