mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-01 12:11:43 +00:00
Cleanups
This commit is contained in:
parent
60d537fa32
commit
0a9eb98cc8
@ -659,51 +659,51 @@ bool cheat_manager_alloc_if_empty(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
int cheat_manager_initialize_memory(void *data, bool wraparound)
|
||||
int cheat_manager_initialize_memory(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
retro_ctx_memory_info_t meminfo ;
|
||||
bool refresh = false;
|
||||
bool is_search_initialization = (data != NULL) ;
|
||||
retro_ctx_memory_info_t meminfo;
|
||||
bool refresh = false;
|
||||
bool is_search_initialization = (setting != NULL);
|
||||
|
||||
meminfo.id = RETRO_MEMORY_SYSTEM_RAM ;
|
||||
if (! core_get_memory(&meminfo) )
|
||||
meminfo.id = RETRO_MEMORY_SYSTEM_RAM;
|
||||
if (!core_get_memory(&meminfo))
|
||||
{
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_INIT_FAIL), 1, 180, true);
|
||||
return 0 ;
|
||||
return 0;
|
||||
}
|
||||
|
||||
cheat_manager_state.actual_memory_size = (unsigned)meminfo.size ;
|
||||
cheat_manager_state.curr_memory_buf = meminfo.data ;
|
||||
cheat_manager_state.total_memory_size = (unsigned)meminfo.size ;
|
||||
cheat_manager_state.num_matches = (cheat_manager_state.total_memory_size*8)/((int)pow(2,cheat_manager_state.search_bit_size)) ;
|
||||
cheat_manager_state.actual_memory_size = (unsigned)meminfo.size;
|
||||
cheat_manager_state.curr_memory_buf = meminfo.data;
|
||||
cheat_manager_state.total_memory_size = (unsigned)meminfo.size;
|
||||
cheat_manager_state.num_matches = (cheat_manager_state.total_memory_size*8)/((int)pow(2,cheat_manager_state.search_bit_size));
|
||||
/* Ensure we're aligned on 4-byte boundary */
|
||||
#if 0
|
||||
if (meminfo.size % 4 > 0)
|
||||
cheat_manager_state.total_memory_size = cheat_manager_state.total_memory_size + (4 - (meminfo.size%4)) ;
|
||||
cheat_manager_state.total_memory_size = cheat_manager_state.total_memory_size + (4 - (meminfo.size%4));
|
||||
#endif
|
||||
if ( is_search_initialization )
|
||||
if (is_search_initialization)
|
||||
{
|
||||
cheat_manager_state.prev_memory_buf = (uint8_t*) calloc(cheat_manager_state.total_memory_size, sizeof(uint8_t));
|
||||
if (!cheat_manager_state.prev_memory_buf )
|
||||
if (!cheat_manager_state.prev_memory_buf)
|
||||
{
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_INIT_FAIL), 1, 180, true);
|
||||
return 0 ;
|
||||
return 0;
|
||||
}
|
||||
cheat_manager_state.matches = (uint8_t*) calloc(cheat_manager_state.total_memory_size, sizeof(uint8_t));
|
||||
if (!cheat_manager_state.matches )
|
||||
if (!cheat_manager_state.matches)
|
||||
{
|
||||
free(cheat_manager_state.prev_memory_buf) ;
|
||||
cheat_manager_state.prev_memory_buf = NULL ;
|
||||
free(cheat_manager_state.prev_memory_buf);
|
||||
cheat_manager_state.prev_memory_buf = NULL;
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_INIT_FAIL), 1, 180, true);
|
||||
return 0 ;
|
||||
return 0;
|
||||
}
|
||||
|
||||
memset(cheat_manager_state.matches, 0xFF, cheat_manager_state.total_memory_size) ;
|
||||
memset(cheat_manager_state.matches, 0xFF, cheat_manager_state.total_memory_size);
|
||||
memcpy(cheat_manager_state.prev_memory_buf, cheat_manager_state.curr_memory_buf, cheat_manager_state.actual_memory_size);
|
||||
cheat_manager_state.memory_search_initialized = true ;
|
||||
cheat_manager_state.memory_search_initialized = true;
|
||||
}
|
||||
|
||||
cheat_manager_state.memory_initialized = true ;
|
||||
cheat_manager_state.memory_initialized = true;
|
||||
|
||||
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEAT_INIT_SUCCESS), 1, 180, true);
|
||||
@ -716,7 +716,7 @@ int cheat_manager_initialize_memory(void *data, bool wraparound)
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0 ;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void cheat_manager_setup_search_meta(unsigned int bitsize, unsigned int *bytes_per_item, unsigned int *mask, unsigned int *bits)
|
||||
@ -768,39 +768,39 @@ static void cheat_manager_setup_search_meta(unsigned int bitsize, unsigned int *
|
||||
}
|
||||
}
|
||||
|
||||
int cheat_manager_search_exact(void *data, bool wraparound)
|
||||
int cheat_manager_search_exact(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
return cheat_manager_search(CHEAT_SEARCH_TYPE_EXACT) ;
|
||||
}
|
||||
int cheat_manager_search_lt(void *data, bool wraparound)
|
||||
int cheat_manager_search_lt(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
return cheat_manager_search(CHEAT_SEARCH_TYPE_LT) ;
|
||||
}
|
||||
int cheat_manager_search_gt(void *data, bool wraparound)
|
||||
int cheat_manager_search_gt(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
return cheat_manager_search(CHEAT_SEARCH_TYPE_GT) ;
|
||||
}
|
||||
int cheat_manager_search_lte(void *data, bool wraparound)
|
||||
int cheat_manager_search_lte(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
return cheat_manager_search(CHEAT_SEARCH_TYPE_LTE) ;
|
||||
}
|
||||
int cheat_manager_search_gte(void *data, bool wraparound)
|
||||
int cheat_manager_search_gte(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
return cheat_manager_search(CHEAT_SEARCH_TYPE_GTE) ;
|
||||
}
|
||||
int cheat_manager_search_eq(void *data, bool wraparound)
|
||||
int cheat_manager_search_eq(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
return cheat_manager_search(CHEAT_SEARCH_TYPE_EQ) ;
|
||||
}
|
||||
int cheat_manager_search_neq(void *data, bool wraparound)
|
||||
int cheat_manager_search_neq(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
return cheat_manager_search(CHEAT_SEARCH_TYPE_NEQ) ;
|
||||
}
|
||||
int cheat_manager_search_eqplus(void *data, bool wraparound)
|
||||
int cheat_manager_search_eqplus(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
return cheat_manager_search(CHEAT_SEARCH_TYPE_EQPLUS) ;
|
||||
}
|
||||
int cheat_manager_search_eqminus(void *data, bool wraparound)
|
||||
int cheat_manager_search_eqminus(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
return cheat_manager_search(CHEAT_SEARCH_TYPE_EQMINUS) ;
|
||||
}
|
||||
@ -808,15 +808,15 @@ int cheat_manager_search_eqminus(void *data, bool wraparound)
|
||||
int cheat_manager_search(enum cheat_search_type search_type)
|
||||
{
|
||||
char msg[100];
|
||||
unsigned char *curr = cheat_manager_state.curr_memory_buf ;
|
||||
unsigned char *prev = cheat_manager_state.prev_memory_buf ;
|
||||
unsigned int idx = 0 ;
|
||||
unsigned int curr_val ;
|
||||
unsigned int prev_val ;
|
||||
unsigned int mask = 0 ;
|
||||
unsigned int bytes_per_item = 1 ;
|
||||
unsigned int bits = 8 ;
|
||||
bool refresh = false;
|
||||
unsigned char *curr = cheat_manager_state.curr_memory_buf;
|
||||
unsigned char *prev = cheat_manager_state.prev_memory_buf;
|
||||
unsigned int idx = 0;
|
||||
unsigned int curr_val = 0;
|
||||
unsigned int prev_val = 0;
|
||||
unsigned int mask = 0;
|
||||
unsigned int bytes_per_item = 1;
|
||||
unsigned int bits = 8;
|
||||
bool refresh = false;
|
||||
|
||||
if (!cheat_manager_state.curr_memory_buf)
|
||||
{
|
||||
@ -832,7 +832,7 @@ int cheat_manager_search(enum cheat_search_type search_type)
|
||||
{
|
||||
unsigned byte_part;
|
||||
|
||||
switch (bytes_per_item )
|
||||
switch (bytes_per_item)
|
||||
{
|
||||
case 2 :
|
||||
{
|
||||
@ -1438,14 +1438,14 @@ void cheat_manager_match_action(enum cheat_match_action_type match_action, unsig
|
||||
}
|
||||
}
|
||||
}
|
||||
int cheat_manager_copy_match(void *data, bool wraparound)
|
||||
int cheat_manager_copy_match(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
cheat_manager_match_action(CHEAT_MATCH_ACTION_TYPE_COPY,
|
||||
cheat_manager_state.match_idx, NULL, NULL, NULL, NULL) ;
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
int cheat_manager_delete_match(void *data, bool wraparound)
|
||||
int cheat_manager_delete_match(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
bool refresh = false;
|
||||
cheat_manager_match_action(CHEAT_MATCH_ACTION_TYPE_DELETE,
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#include "setting_list.h"
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
|
||||
@ -217,24 +219,39 @@ void cheat_manager_load_game_specific_cheats(void);
|
||||
|
||||
void cheat_manager_save_game_specific_cheats(void);
|
||||
|
||||
int cheat_manager_initialize_memory(void *data, bool wraparound);
|
||||
int cheat_manager_search_exact(void *data, bool wraparound);
|
||||
int cheat_manager_search_lt(void *data, bool wraparound);
|
||||
int cheat_manager_search_gt(void *data, bool wraparound);
|
||||
int cheat_manager_search_lte(void *data, bool wraparound);
|
||||
int cheat_manager_search_gte(void *data, bool wraparound);
|
||||
int cheat_manager_search_eq(void *data, bool wraparound);
|
||||
int cheat_manager_search_neq(void *data, bool wraparound);
|
||||
int cheat_manager_search_eqplus(void *data, bool wraparound);
|
||||
int cheat_manager_search_eqminus(void *data, bool wraparound);
|
||||
int cheat_manager_initialize_memory(rarch_setting_t *setting, bool wraparound);
|
||||
|
||||
int cheat_manager_search_exact(rarch_setting_t *setting, bool wraparound);
|
||||
|
||||
int cheat_manager_search_lt(rarch_setting_t *setting, bool wraparound);
|
||||
|
||||
int cheat_manager_search_gt(rarch_setting_t *setting, bool wraparound);
|
||||
|
||||
int cheat_manager_search_lte(rarch_setting_t *setting, bool wraparound);
|
||||
|
||||
int cheat_manager_search_gte(rarch_setting_t *setting, bool wraparound);
|
||||
|
||||
int cheat_manager_search_eq(rarch_setting_t *setting, bool wraparound);
|
||||
|
||||
int cheat_manager_search_neq(rarch_setting_t *setting, bool wraparound);
|
||||
|
||||
int cheat_manager_search_eqplus(rarch_setting_t *setting, bool wraparound);
|
||||
|
||||
int cheat_manager_search_eqminus(rarch_setting_t *setting, bool wraparound);
|
||||
|
||||
int cheat_manager_add_matches(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx);
|
||||
|
||||
void cheat_manager_apply_retro_cheats(void);
|
||||
|
||||
int cheat_manager_search(enum cheat_search_type search_type);
|
||||
|
||||
void cheat_manager_match_action(enum cheat_match_action_type match_action, unsigned int target_match_idx, unsigned int *address, unsigned int *address_mask,
|
||||
unsigned int *prev_value, unsigned int *curr_value);
|
||||
int cheat_manager_copy_match(void *data, bool wraparound);
|
||||
int cheat_manager_delete_match(void *data, bool wraparound);
|
||||
|
||||
int cheat_manager_copy_match(rarch_setting_t *setting, bool wraparound);
|
||||
|
||||
int cheat_manager_delete_match(rarch_setting_t *setting, bool wraparound);
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -51,254 +51,6 @@
|
||||
|
||||
extern struct key_desc key_descriptors[RARCH_MAX_KEYS];
|
||||
|
||||
int setting_action_left_analog_dpad_mode(void *data, bool wraparound)
|
||||
{
|
||||
unsigned port = 0;
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
port = setting->index_offset;
|
||||
|
||||
configuration_set_uint(settings, settings->uints.input_analog_dpad_mode[port],
|
||||
(settings->uints.input_analog_dpad_mode
|
||||
[port] + ANALOG_DPAD_LAST - 1) % ANALOG_DPAD_LAST);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int setting_action_left_libretro_device_type(
|
||||
void *data, bool wraparound)
|
||||
{
|
||||
retro_ctx_controller_info_t pad;
|
||||
unsigned current_device, current_idx, i, devices[128],
|
||||
types = 0, port = 0;
|
||||
const struct retro_controller_info *desc = NULL;
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
rarch_system_info_t *system = NULL;
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
port = setting->index_offset;
|
||||
|
||||
devices[types++] = RETRO_DEVICE_NONE;
|
||||
devices[types++] = RETRO_DEVICE_JOYPAD;
|
||||
|
||||
system = runloop_get_system_info();
|
||||
|
||||
if (system)
|
||||
{
|
||||
/* Only push RETRO_DEVICE_ANALOG as default if we use an
|
||||
* older core which doesn't use SET_CONTROLLER_INFO. */
|
||||
if (!system->ports.size)
|
||||
devices[types++] = RETRO_DEVICE_ANALOG;
|
||||
|
||||
if (port < system->ports.size)
|
||||
desc = &system->ports.data[port];
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
current_device = input_config_get_device(port);
|
||||
current_idx = 0;
|
||||
for (i = 0; i < types; i++)
|
||||
{
|
||||
if (current_device != devices[i])
|
||||
continue;
|
||||
|
||||
current_idx = i;
|
||||
break;
|
||||
}
|
||||
|
||||
current_device = devices
|
||||
[(current_idx + types - 1) % types];
|
||||
|
||||
input_config_set_device(port, current_device);
|
||||
|
||||
pad.port = port;
|
||||
pad.device = current_device;
|
||||
|
||||
core_set_controller_port_device(&pad);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int setting_action_left_bind_device(void *data, bool wraparound)
|
||||
{
|
||||
unsigned *p = NULL;
|
||||
unsigned index_offset = 0;
|
||||
unsigned max_devices = input_config_get_device_count();
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!setting || max_devices == 0)
|
||||
return -1;
|
||||
|
||||
index_offset = setting->index_offset;
|
||||
|
||||
p = &settings->uints.input_joypad_map[index_offset];
|
||||
|
||||
if ((*p) >= max_devices)
|
||||
*p = max_devices - 1;
|
||||
else if ((*p) > 0)
|
||||
(*p)--;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int setting_action_left_mouse_index(void *data, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
if (settings->uints.input_mouse_index[setting->index_offset])
|
||||
{
|
||||
--settings->uints.input_mouse_index[setting->index_offset];
|
||||
settings->modified = true;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int setting_uint_action_left_custom_viewport_width(
|
||||
void *data, bool wraparound)
|
||||
{
|
||||
video_viewport_t vp;
|
||||
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
|
||||
video_viewport_t *custom = video_viewport_get_custom();
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct retro_game_geometry *geom = (struct retro_game_geometry*)
|
||||
&av_info->geometry;
|
||||
|
||||
if (!settings || !av_info)
|
||||
return -1;
|
||||
|
||||
video_driver_get_viewport_info(&vp);
|
||||
|
||||
if (custom->width <= 1)
|
||||
custom->width = 1;
|
||||
else if (settings->bools.video_scale_integer)
|
||||
{
|
||||
if (custom->width > geom->base_width)
|
||||
custom->width -= geom->base_width;
|
||||
}
|
||||
else
|
||||
custom->width -= 1;
|
||||
|
||||
aspectratio_lut[ASPECT_RATIO_CUSTOM].value =
|
||||
(float)custom->width / custom->height;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int setting_uint_action_left_custom_viewport_height(
|
||||
void *data, bool wraparound)
|
||||
{
|
||||
video_viewport_t vp;
|
||||
struct retro_system_av_info *av_info = video_viewport_get_system_av_info();
|
||||
video_viewport_t *custom = video_viewport_get_custom();
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct retro_game_geometry *geom = (struct retro_game_geometry*)
|
||||
&av_info->geometry;
|
||||
|
||||
if (!settings || !av_info)
|
||||
return -1;
|
||||
|
||||
video_driver_get_viewport_info(&vp);
|
||||
|
||||
if (custom->height <= 1)
|
||||
custom->height = 1;
|
||||
else if (settings->bools.video_scale_integer)
|
||||
{
|
||||
if (custom->height > geom->base_height)
|
||||
custom->height -= geom->base_height;
|
||||
}
|
||||
else
|
||||
custom->height -= 1;
|
||||
|
||||
aspectratio_lut[ASPECT_RATIO_CUSTOM].value =
|
||||
(float)custom->width / custom->height;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int setting_string_action_left_audio_device(
|
||||
void *data, bool wraparound)
|
||||
{
|
||||
#if !defined(RARCH_CONSOLE)
|
||||
int audio_device_index;
|
||||
struct string_list *ptr = NULL;
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
if (!audio_driver_get_devices_list((void**)&ptr))
|
||||
return -1;
|
||||
|
||||
if (!ptr)
|
||||
return -1;
|
||||
|
||||
/* Get index in the string list */
|
||||
audio_device_index = string_list_find_elem(
|
||||
ptr, setting->value.target.string) - 1;
|
||||
audio_device_index--;
|
||||
|
||||
/* Reset index if needed */
|
||||
if (audio_device_index < 0)
|
||||
audio_device_index = (int)(ptr->size - 1);
|
||||
|
||||
strlcpy(setting->value.target.string, ptr->elems[audio_device_index].data, setting->size);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int setting_string_action_left_driver(void *data,
|
||||
bool wraparound)
|
||||
{
|
||||
driver_ctx_info_t drv;
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
drv.label = setting->name;
|
||||
drv.s = setting->value.target.string;
|
||||
drv.len = setting->size;
|
||||
|
||||
if (!driver_ctl(RARCH_DRIVER_CTL_FIND_PREV, &drv))
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (settings && settings->bools.menu_navigation_wraparound_enable)
|
||||
{
|
||||
drv.label = setting->name;
|
||||
drv.s = setting->value.target.string;
|
||||
drv.len = setting->size;
|
||||
driver_ctl(RARCH_DRIVER_CTL_FIND_LAST, &drv);
|
||||
}
|
||||
}
|
||||
|
||||
if (setting->change_handler)
|
||||
setting->change_handler(setting);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int generic_shader_action_parameter_left(
|
||||
struct video_shader_parameter *param,
|
||||
unsigned type, const char *label, bool wraparound)
|
||||
|
@ -141,120 +141,6 @@ static char *lakka_get_project(void)
|
||||
info.enum_idx = a; \
|
||||
dl_type = b;
|
||||
|
||||
int setting_action_ok_video_refresh_rate_auto(void *data, bool wraparound)
|
||||
{
|
||||
double video_refresh_rate = 0.0;
|
||||
double deviation = 0.0;
|
||||
unsigned sample_points = 0;
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
if (video_monitor_fps_statistics(&video_refresh_rate,
|
||||
&deviation, &sample_points))
|
||||
{
|
||||
float video_refresh_rate_float = (float)video_refresh_rate;
|
||||
driver_ctl(RARCH_DRIVER_CTL_SET_REFRESH_RATE, &video_refresh_rate_float);
|
||||
/* Incase refresh rate update forced non-block video. */
|
||||
command_event(CMD_EVENT_VIDEO_SET_BLOCKING_STATE, NULL);
|
||||
}
|
||||
|
||||
if (setting_generic_action_ok_default(setting, wraparound) != 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int setting_action_ok_video_refresh_rate_polled(void *data, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
float refresh_rate = 0.0;
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
if ((refresh_rate = video_driver_get_refresh_rate()) == 0.0)
|
||||
return -1;
|
||||
|
||||
driver_ctl(RARCH_DRIVER_CTL_SET_REFRESH_RATE, &refresh_rate);
|
||||
/* Incase refresh rate update forced non-block video. */
|
||||
command_event(CMD_EVENT_VIDEO_SET_BLOCKING_STATE, NULL);
|
||||
|
||||
if (setting_generic_action_ok_default(setting, wraparound) != 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int setting_action_ok_bind_all(void *data, bool wraparound)
|
||||
{
|
||||
(void)wraparound;
|
||||
if (!menu_input_key_bind_set_mode(MENU_INPUT_BINDS_CTL_BIND_ALL, data))
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int setting_action_ok_bind_all_save_autoconfig(void *data,
|
||||
bool wraparound)
|
||||
{
|
||||
unsigned index_offset;
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
const char *name = NULL;
|
||||
|
||||
(void)wraparound;
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
index_offset = setting->index_offset;
|
||||
name = input_config_get_device_name(index_offset);
|
||||
|
||||
if(!string_is_empty(name) && config_save_autoconf_profile(name, index_offset))
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MSG_AUTOCONFIG_FILE_SAVED_SUCCESSFULLY), 1, 100, true);
|
||||
else
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MSG_AUTOCONFIG_FILE_ERROR_SAVING), 1, 100, true);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int setting_action_ok_bind_defaults(void *data, bool wraparound)
|
||||
{
|
||||
unsigned i;
|
||||
menu_input_ctx_bind_limits_t lim;
|
||||
struct retro_keybind *target = NULL;
|
||||
const struct retro_keybind *def_binds = NULL;
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
(void)wraparound;
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
target = &input_config_binds[setting->index_offset][0];
|
||||
def_binds = (setting->index_offset) ?
|
||||
retro_keybinds_rest : retro_keybinds_1;
|
||||
|
||||
lim.min = MENU_SETTINGS_BIND_BEGIN;
|
||||
lim.max = MENU_SETTINGS_BIND_LAST;
|
||||
|
||||
menu_input_key_bind_set_min_max(&lim);
|
||||
|
||||
for (i = MENU_SETTINGS_BIND_BEGIN;
|
||||
i <= MENU_SETTINGS_BIND_LAST; i++, target++)
|
||||
{
|
||||
target->key = def_binds[i - MENU_SETTINGS_BIND_BEGIN].key;
|
||||
target->joykey = NO_BTN;
|
||||
target->joyaxis = AXIS_NONE;
|
||||
target->mbutton = NO_BTN;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static enum msg_hash_enums action_ok_dl_to_enum(unsigned lbl)
|
||||
{
|
||||
switch (lbl)
|
||||
|
@ -178,38 +178,6 @@ int action_right_input_desc_kbd(unsigned type, const char *label,
|
||||
int action_right_cheat(unsigned type, const char *label,
|
||||
bool wraparound);
|
||||
|
||||
int setting_action_ok_video_refresh_rate_auto(void *data, bool wraparound);
|
||||
|
||||
int setting_action_ok_video_refresh_rate_polled(void *data, bool wraparound);
|
||||
|
||||
int setting_action_ok_bind_all(void *data, bool wraparound);
|
||||
|
||||
int setting_action_ok_bind_all_save_autoconfig(void *data,
|
||||
bool wraparound);
|
||||
|
||||
int setting_action_ok_bind_defaults(void *data, bool wraparound);
|
||||
|
||||
int setting_action_left_analog_dpad_mode(void *data, bool wraparound);
|
||||
|
||||
int setting_action_left_libretro_device_type(
|
||||
void *data, bool wraparound);
|
||||
|
||||
int setting_action_left_bind_device(void *data, bool wraparound);
|
||||
|
||||
int setting_action_left_mouse_index(void *data, bool wraparound);
|
||||
|
||||
int setting_uint_action_left_custom_viewport_width(
|
||||
void *data, bool wraparound);
|
||||
|
||||
int setting_uint_action_left_custom_viewport_height(
|
||||
void *data, bool wraparound);
|
||||
|
||||
int setting_string_action_left_driver(void *data,
|
||||
bool wraparound);
|
||||
|
||||
int setting_string_action_left_audio_device(
|
||||
void *data, bool wraparound);
|
||||
|
||||
/* End of function callbacks */
|
||||
|
||||
int menu_cbs_init_bind_left(menu_file_list_cbs_t *cbs,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -98,7 +98,7 @@ rarch_setting_t *menu_setting_find_enum(enum msg_hash_enums enum_idx);
|
||||
*
|
||||
* Get a setting value's string representation.
|
||||
**/
|
||||
void menu_setting_get_string_representation(void *data, char *s, size_t len);
|
||||
void menu_setting_get_string_representation(rarch_setting_t *setting, char *s, size_t len);
|
||||
|
||||
/**
|
||||
* menu_setting_get_label:
|
||||
|
128
setting_list.c
128
setting_list.c
@ -70,21 +70,20 @@ unsigned setting_get_bind_type(rarch_setting_t *setting)
|
||||
return setting->bind_type;
|
||||
}
|
||||
|
||||
static int setting_bind_action_ok(void *data, bool wraparound)
|
||||
static int setting_bind_action_ok(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
(void)wraparound; /* TODO/FIXME - handle this */
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
/* TODO - get rid of menu dependency */
|
||||
if (!menu_input_key_bind_set_mode(MENU_INPUT_BINDS_CTL_BIND_SINGLE, data))
|
||||
if (!menu_input_key_bind_set_mode(MENU_INPUT_BINDS_CTL_BIND_SINGLE, setting))
|
||||
return -1;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int setting_int_action_right_default(void *data, bool wraparound)
|
||||
static int setting_int_action_right_default(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
double max = 0.0f;
|
||||
|
||||
if (!setting)
|
||||
@ -117,11 +116,10 @@ static int setting_int_action_right_default(void *data, bool wraparound)
|
||||
}
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
static int setting_bind_action_start(void *data)
|
||||
static int setting_bind_action_start(rarch_setting_t *setting)
|
||||
{
|
||||
unsigned bind_type;
|
||||
struct retro_keybind *keybind = NULL;
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
struct retro_keybind *def_binds = (struct retro_keybind *)retro_keybinds_1;
|
||||
|
||||
if (!setting)
|
||||
@ -146,55 +144,49 @@ static int setting_bind_action_start(void *data)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void setting_get_string_representation_hex(void *data,
|
||||
static void setting_get_string_representation_hex(rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
if (setting)
|
||||
snprintf(s, len, "%08x",
|
||||
*setting->value.target.unsigned_integer);
|
||||
}
|
||||
|
||||
void setting_get_string_representation_hex_and_uint(void *data,
|
||||
void setting_get_string_representation_hex_and_uint(rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
if (setting)
|
||||
snprintf(s, len, "%u (%08X)",
|
||||
*setting->value.target.unsigned_integer, *setting->value.target.unsigned_integer);
|
||||
}
|
||||
|
||||
void setting_get_string_representation_uint(void *data,
|
||||
void setting_get_string_representation_uint(rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
if (setting)
|
||||
snprintf(s, len, "%u",
|
||||
*setting->value.target.unsigned_integer);
|
||||
}
|
||||
|
||||
void setting_get_string_representation_size(void *data,
|
||||
void setting_get_string_representation_size(rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
if (setting)
|
||||
snprintf(s, len, "%" PRI_SIZET,
|
||||
*setting->value.target.sizet);
|
||||
}
|
||||
|
||||
void setting_get_string_representation_size_in_mb(void *data,
|
||||
void setting_get_string_representation_size_in_mb(rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
if (setting)
|
||||
snprintf(s, len, "%" PRI_SIZET,
|
||||
(*setting->value.target.sizet)/(1024*1024));
|
||||
}
|
||||
|
||||
void setting_get_string_representation_uint_as_enum(void *data,
|
||||
void setting_get_string_representation_uint_as_enum(rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
if (setting)
|
||||
snprintf(s, len, "%s",
|
||||
msg_hash_to_str((enum msg_hash_enums)(
|
||||
@ -252,12 +244,11 @@ static float recalc_step_based_on_length_of_action(rarch_setting_t *setting)
|
||||
return step < setting->step ? setting->step : step ;
|
||||
}
|
||||
|
||||
int setting_uint_action_left_default(void *data, bool wraparound)
|
||||
int setting_uint_action_left_default(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
double min = 0.0f;
|
||||
double min = 0.0f;
|
||||
bool overflowed = false;
|
||||
float step = 0.0f ;
|
||||
float step = 0.0f ;
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
@ -293,10 +284,9 @@ int setting_uint_action_left_default(void *data, bool wraparound)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int setting_uint_action_right_default(void *data, bool wraparound)
|
||||
int setting_uint_action_right_default(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
double max = 0.0f;
|
||||
double max = 0.0f;
|
||||
float step = 0.0f ;
|
||||
|
||||
if (!setting)
|
||||
@ -331,9 +321,9 @@ int setting_uint_action_right_default(void *data, bool wraparound)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int setting_uint_action_right_with_refresh(void *data, bool wraparound)
|
||||
int setting_uint_action_right_with_refresh(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
int retval = setting_uint_action_right_default(data, wraparound) ;
|
||||
int retval = setting_uint_action_right_default(setting, wraparound) ;
|
||||
bool refresh = false;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
@ -344,9 +334,9 @@ int setting_uint_action_right_with_refresh(void *data, bool wraparound)
|
||||
return retval ;
|
||||
}
|
||||
|
||||
int setting_uint_action_left_with_refresh(void *data, bool wraparound)
|
||||
int setting_uint_action_left_with_refresh(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
int retval = setting_uint_action_left_default(data, wraparound) ;
|
||||
int retval = setting_uint_action_left_default(setting, wraparound) ;
|
||||
bool refresh = false;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
@ -359,12 +349,11 @@ int setting_uint_action_left_with_refresh(void *data, bool wraparound)
|
||||
}
|
||||
|
||||
|
||||
static int setting_size_action_left_default(void *data, bool wraparound)
|
||||
static int setting_size_action_left_default(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
double min = 0.0f;
|
||||
double min = 0.0f;
|
||||
bool overflowed = false;
|
||||
float step = 0.0f ;
|
||||
float step = 0.0f ;
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
@ -400,10 +389,9 @@ static int setting_size_action_left_default(void *data, bool wraparound)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int setting_size_action_right_default(void *data, bool wraparound)
|
||||
static int setting_size_action_right_default(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
double max = 0.0f;
|
||||
double max = 0.0f;
|
||||
float step = 0.0f ;
|
||||
|
||||
if (!setting)
|
||||
@ -438,10 +426,8 @@ static int setting_size_action_right_default(void *data, bool wraparound)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int setting_generic_action_ok_default(void *data, bool wraparound)
|
||||
int setting_generic_action_ok_default(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
@ -453,11 +439,9 @@ int setting_generic_action_ok_default(void *data, bool wraparound)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void setting_get_string_representation_int(void *data,
|
||||
static void setting_get_string_representation_int(rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
if (setting)
|
||||
snprintf(s, len, "%d", *setting->value.target.integer);
|
||||
}
|
||||
@ -581,9 +565,8 @@ int setting_set_with_string_representation(rarch_setting_t* setting,
|
||||
}
|
||||
|
||||
static int setting_fraction_action_left_default(
|
||||
void *data, bool wraparound)
|
||||
rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
double min = 0.0f;
|
||||
|
||||
if (!setting)
|
||||
@ -616,9 +599,8 @@ static int setting_fraction_action_left_default(
|
||||
}
|
||||
|
||||
static int setting_fraction_action_right_default(
|
||||
void *data, bool wraparound)
|
||||
rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
double max = 0.0f;
|
||||
|
||||
if (!setting)
|
||||
@ -702,10 +684,8 @@ static void setting_reset_setting(rarch_setting_t* setting)
|
||||
setting->change_handler(setting);
|
||||
}
|
||||
|
||||
int setting_generic_action_start_default(void *data)
|
||||
int setting_generic_action_start_default(rarch_setting_t *setting)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
@ -714,10 +694,9 @@ int setting_generic_action_start_default(void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void setting_get_string_representation_default(void *data,
|
||||
static void setting_get_string_representation_default(rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
(void)data;
|
||||
strlcpy(s, "...", len);
|
||||
}
|
||||
|
||||
@ -730,11 +709,9 @@ static void setting_get_string_representation_default(void *data,
|
||||
*
|
||||
* Set a settings' label value. The setting is of type ST_BOOL.
|
||||
**/
|
||||
static void setting_get_string_representation_st_bool(void *data,
|
||||
static void setting_get_string_representation_st_bool(rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
if (setting)
|
||||
strlcpy(s, *setting->value.target.boolean ? setting->boolean.on_label :
|
||||
setting->boolean.off_label, len);
|
||||
@ -750,21 +727,17 @@ static void setting_get_string_representation_st_bool(void *data,
|
||||
*
|
||||
* Set a settings' label value. The setting is of type ST_FLOAT.
|
||||
**/
|
||||
static void setting_get_string_representation_st_float(void *data,
|
||||
static void setting_get_string_representation_st_float(rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
if (setting)
|
||||
snprintf(s, len, setting->rounding_fraction,
|
||||
*setting->value.target.fraction);
|
||||
}
|
||||
|
||||
static void setting_get_string_representation_st_dir(void *data,
|
||||
static void setting_get_string_representation_st_dir(rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
if (setting)
|
||||
strlcpy(s,
|
||||
*setting->value.target.string ?
|
||||
@ -772,29 +745,24 @@ static void setting_get_string_representation_st_dir(void *data,
|
||||
len);
|
||||
}
|
||||
|
||||
static void setting_get_string_representation_st_path(void *data,
|
||||
static void setting_get_string_representation_st_path(rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
if (setting)
|
||||
fill_short_pathname_representation(s, setting->value.target.string, len);
|
||||
}
|
||||
|
||||
static void setting_get_string_representation_st_string(void *data,
|
||||
static void setting_get_string_representation_st_string(rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
if (setting)
|
||||
strlcpy(s, setting->value.target.string, len);
|
||||
}
|
||||
|
||||
static void setting_get_string_representation_st_bind(void *data,
|
||||
static void setting_get_string_representation_st_bind(rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
unsigned index_offset;
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
unsigned index_offset = 0;
|
||||
const struct retro_keybind* keybind = NULL;
|
||||
const struct retro_keybind* auto_bind = NULL;
|
||||
|
||||
@ -809,10 +777,8 @@ static void setting_get_string_representation_st_bind(void *data,
|
||||
input_config_get_bind_string(s, keybind, auto_bind, len);
|
||||
}
|
||||
|
||||
static int setting_action_action_ok(void *data, bool wraparound)
|
||||
static int setting_action_action_ok(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
@ -1348,9 +1314,8 @@ static rarch_setting_t setting_bind_setting(const char* name,
|
||||
return result;
|
||||
}
|
||||
|
||||
static int setting_int_action_left_default(void *data, bool wraparound)
|
||||
static int setting_int_action_left_default(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
double min = 0.0f;
|
||||
|
||||
if (!setting)
|
||||
@ -1382,10 +1347,8 @@ static int setting_int_action_left_default(void *data, bool wraparound)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int setting_bool_action_ok_default(void *data, bool wraparound)
|
||||
static int setting_bool_action_ok_default(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
@ -1397,10 +1360,8 @@ static int setting_bool_action_ok_default(void *data, bool wraparound)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int setting_bool_action_toggle_default(void *data, bool wraparound)
|
||||
static int setting_bool_action_toggle_default(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
@ -1412,10 +1373,8 @@ static int setting_bool_action_toggle_default(void *data, bool wraparound)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int setting_string_action_start_generic(void *data)
|
||||
int setting_string_action_start_generic(rarch_setting_t *setting)
|
||||
{
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
@ -2355,11 +2314,10 @@ static void menu_input_st_hex_cb(void *userdata, const char *str)
|
||||
menu_input_dialog_end();
|
||||
}
|
||||
|
||||
static int setting_generic_action_ok_linefeed(void *data, bool wraparound)
|
||||
static int setting_generic_action_ok_linefeed(rarch_setting_t *setting, bool wraparound)
|
||||
{
|
||||
menu_input_ctx_line_t line;
|
||||
input_keyboard_line_complete_t cb = NULL;
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
@ -74,15 +74,15 @@ typedef struct rarch_setting_info rarch_setting_info_t;
|
||||
typedef struct rarch_setting_group_info rarch_setting_group_info_t;
|
||||
|
||||
typedef void (*change_handler_t )(rarch_setting_t *data);
|
||||
typedef int (*action_left_handler_t )(void *data, bool wraparound);
|
||||
typedef int (*action_right_handler_t )(void *data, bool wraparound);
|
||||
typedef int (*action_up_handler_t )(void *data);
|
||||
typedef int (*action_down_handler_t )(void *data);
|
||||
typedef int (*action_start_handler_t )(void *data);
|
||||
typedef int (*action_cancel_handler_t )(void *data);
|
||||
typedef int (*action_ok_handler_t )(void *data, bool wraparound);
|
||||
typedef int (*action_select_handler_t )(void *data, bool wraparound);
|
||||
typedef void (*get_string_representation_t )(void *data, char *s, size_t len);
|
||||
typedef int (*action_left_handler_t )(rarch_setting_t *data, bool wraparound);
|
||||
typedef int (*action_right_handler_t )(rarch_setting_t *setting, bool wraparound);
|
||||
typedef int (*action_up_handler_t )(rarch_setting_t *setting);
|
||||
typedef int (*action_down_handler_t )(rarch_setting_t *setting);
|
||||
typedef int (*action_start_handler_t )(rarch_setting_t *setting);
|
||||
typedef int (*action_cancel_handler_t )(rarch_setting_t *setting);
|
||||
typedef int (*action_ok_handler_t )(rarch_setting_t *setting, bool wraparound);
|
||||
typedef int (*action_select_handler_t )(rarch_setting_t *setting, bool wraparound);
|
||||
typedef void (*get_string_representation_t )(rarch_setting_t *setting, char *s, size_t len);
|
||||
|
||||
struct rarch_setting_group_info
|
||||
{
|
||||
@ -416,11 +416,11 @@ int setting_set_with_string_representation(
|
||||
|
||||
unsigned setting_get_bind_type(rarch_setting_t *setting);
|
||||
|
||||
int setting_string_action_start_generic(void *data);
|
||||
int setting_string_action_start_generic(rarch_setting_t *setting);
|
||||
|
||||
int setting_generic_action_ok_default(void *data, bool wraparound);
|
||||
int setting_generic_action_ok_default(rarch_setting_t *setting, bool wraparound);
|
||||
|
||||
int setting_generic_action_start_default(void *data);
|
||||
int setting_generic_action_start_default(rarch_setting_t *setting);
|
||||
|
||||
void settings_data_list_current_add_flags(
|
||||
rarch_setting_t **list,
|
||||
@ -432,20 +432,20 @@ void settings_data_list_current_add_free_flags(
|
||||
rarch_setting_info_t *list_info,
|
||||
unsigned values);
|
||||
|
||||
void setting_get_string_representation_size_in_mb(void *data,
|
||||
void setting_get_string_representation_size_in_mb(rarch_setting_t *setting,
|
||||
char *s, size_t len);
|
||||
|
||||
int setting_uint_action_right_with_refresh(void *data, bool wraparound) ;
|
||||
int setting_uint_action_right_with_refresh(rarch_setting_t *setting, bool wraparound);
|
||||
|
||||
int setting_uint_action_left_with_refresh(void *data, bool wraparound) ;
|
||||
int setting_uint_action_left_with_refresh(rarch_setting_t *setting, bool wraparound) ;
|
||||
|
||||
void setting_get_string_representation_uint_as_enum(void *data,
|
||||
void setting_get_string_representation_uint_as_enum(rarch_setting_t *setting,
|
||||
char *s, size_t len);
|
||||
|
||||
int setting_uint_action_left_default(void *data, bool wraparound);
|
||||
int setting_uint_action_right_default(void *data, bool wraparound);
|
||||
void setting_get_string_representation_uint(void *data,char *s, size_t len);
|
||||
void setting_get_string_representation_hex_and_uint(void *data, char *s, size_t len);
|
||||
int setting_uint_action_left_default(rarch_setting_t *setting, bool wraparound);
|
||||
int setting_uint_action_right_default(rarch_setting_t *setting, bool wraparound);
|
||||
void setting_get_string_representation_uint(rarch_setting_t *setting, char *s, size_t len);
|
||||
void setting_get_string_representation_hex_and_uint(rarch_setting_t *setting, char *s, size_t len);
|
||||
#define setting_get_type(setting) ((setting) ? setting->type : ST_NONE)
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
Loading…
x
Reference in New Issue
Block a user