mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
* Add FIXME LOCALIZE notes
* Some snprintf optimizations
This commit is contained in:
parent
5e3161ea3c
commit
3871ac4455
@ -3462,16 +3462,17 @@ static bool config_load_file(global_t *global,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_NETWORKGAMEPAD
|
#ifdef HAVE_NETWORKGAMEPAD
|
||||||
for (i = 0; i < MAX_USERS; i++)
|
|
||||||
{
|
{
|
||||||
char tmp[64];
|
char tmp[64];
|
||||||
bool tmp_bool = false;
|
size_t _len = strlcpy(tmp, "network_remote_enable_user_p", sizeof(tmp));
|
||||||
size_t _len = strlcpy(tmp, "network_remote_enable_user_p", sizeof(tmp));
|
for (i = 0; i < MAX_USERS; i++)
|
||||||
snprintf(tmp + _len, sizeof(tmp) - _len, "%u", i + 1);
|
{
|
||||||
|
bool tmp_bool = false;
|
||||||
if (config_get_bool(conf, tmp, &tmp_bool))
|
snprintf(tmp + _len, sizeof(tmp) - _len, "%u", i + 1);
|
||||||
configuration_set_bool(settings,
|
if (config_get_bool(conf, tmp, &tmp_bool))
|
||||||
settings->bools.network_remote_enable_user[i], tmp_bool);
|
configuration_set_bool(settings,
|
||||||
|
settings->bools.network_remote_enable_user[i], tmp_bool);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -3509,26 +3510,27 @@ static bool config_load_file(global_t *global,
|
|||||||
*size_settings[i].ptr = *size_settings[i].ptr * 1024 * 1024;
|
*size_settings[i].ptr = *size_settings[i].ptr * 1024 * 1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < MAX_USERS; i++)
|
|
||||||
{
|
{
|
||||||
char buf[64];
|
|
||||||
char prefix[24];
|
char prefix[24];
|
||||||
size_t _len;
|
size_t _len = strlcpy(prefix, "input_player", sizeof(prefix));
|
||||||
buf[0] = '\0';
|
for (i = 0; i < MAX_USERS; i++)
|
||||||
_len = strlcpy(prefix, "input_player", sizeof(prefix));
|
{
|
||||||
snprintf(prefix + _len, sizeof(prefix) - _len, "%u", i + 1);
|
char buf[64];
|
||||||
|
buf[0] = '\0';
|
||||||
|
snprintf(prefix + _len, sizeof(prefix) - _len, "%u", i + 1);
|
||||||
|
|
||||||
strlcpy(buf, prefix, sizeof(buf));
|
strlcpy(buf, prefix, sizeof(buf));
|
||||||
strlcat(buf, "_analog_dpad_mode", sizeof(buf));
|
strlcat(buf, "_analog_dpad_mode", sizeof(buf));
|
||||||
CONFIG_GET_INT_BASE(conf, settings, uints.input_analog_dpad_mode[i], buf);
|
CONFIG_GET_INT_BASE(conf, settings, uints.input_analog_dpad_mode[i], buf);
|
||||||
|
|
||||||
strlcpy(buf, prefix, sizeof(buf));
|
strlcpy(buf, prefix, sizeof(buf));
|
||||||
strlcat(buf, "_joypad_index", sizeof(buf));
|
strlcat(buf, "_joypad_index", sizeof(buf));
|
||||||
CONFIG_GET_INT_BASE(conf, settings, uints.input_joypad_index[i], buf);
|
CONFIG_GET_INT_BASE(conf, settings, uints.input_joypad_index[i], buf);
|
||||||
|
|
||||||
strlcpy(buf, prefix, sizeof(buf));
|
strlcpy(buf, prefix, sizeof(buf));
|
||||||
strlcat(buf, "_mouse_index", sizeof(buf));
|
strlcat(buf, "_mouse_index", sizeof(buf));
|
||||||
CONFIG_GET_INT_BASE(conf, settings, uints.input_mouse_index[i], buf);
|
CONFIG_GET_INT_BASE(conf, settings, uints.input_mouse_index[i], buf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* LED map for use by the led driver */
|
/* LED map for use by the led driver */
|
||||||
|
@ -1599,6 +1599,8 @@ static void core_info_resolve_firmware(
|
|||||||
core_info_t *info, config_file_t *conf)
|
core_info_t *info, config_file_t *conf)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
size_t _len;
|
||||||
|
char prefix[12];
|
||||||
unsigned firmware_count = 0;
|
unsigned firmware_count = 0;
|
||||||
core_info_firmware_t *firmware = NULL;
|
core_info_firmware_t *firmware = NULL;
|
||||||
|
|
||||||
@ -1611,18 +1613,17 @@ static void core_info_resolve_firmware(
|
|||||||
if (!firmware)
|
if (!firmware)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
_len = strlcpy(prefix, "firmware", sizeof(prefix));
|
||||||
|
|
||||||
for (i = 0; i < firmware_count; i++)
|
for (i = 0; i < firmware_count; i++)
|
||||||
{
|
{
|
||||||
char prefix[12];
|
|
||||||
char path_key[64];
|
char path_key[64];
|
||||||
char desc_key[64];
|
char desc_key[64];
|
||||||
char opt_key[64];
|
char opt_key[64];
|
||||||
struct config_entry_list *entry = NULL;
|
struct config_entry_list *entry = NULL;
|
||||||
bool tmp_bool = false;
|
bool tmp_bool = false;
|
||||||
|
|
||||||
prefix[0] = '\0';
|
snprintf(prefix + _len, sizeof(prefix) - _len, "%u_", i);
|
||||||
|
|
||||||
snprintf(prefix, sizeof(prefix), "firmware%u_", i);
|
|
||||||
strlcpy(path_key, prefix, sizeof(path_key));
|
strlcpy(path_key, prefix, sizeof(path_key));
|
||||||
strlcat(path_key, "path", sizeof(path_key));
|
strlcat(path_key, "path", sizeof(path_key));
|
||||||
strlcpy(desc_key, prefix, sizeof(desc_key));
|
strlcpy(desc_key, prefix, sizeof(desc_key));
|
||||||
|
@ -3958,6 +3958,7 @@ void video_driver_frame(const void *data, unsigned width,
|
|||||||
tmp[0] = '\0';
|
tmp[0] = '\0';
|
||||||
len = 0;
|
len = 0;
|
||||||
|
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
if (video_st->frame_delay_target > 0)
|
if (video_st->frame_delay_target > 0)
|
||||||
len = snprintf(tmp, sizeof(latency_stats),
|
len = snprintf(tmp, sizeof(latency_stats),
|
||||||
" Frame Delay: %2u ms\n"
|
" Frame Delay: %2u ms\n"
|
||||||
@ -3983,10 +3984,12 @@ void video_driver_frame(const void *data, unsigned width,
|
|||||||
|
|
||||||
if (len)
|
if (len)
|
||||||
{
|
{
|
||||||
strlcpy(latency_stats, "LATENCY\n", sizeof(latency_stats));
|
/* TODO/FIXME - localize */
|
||||||
strlcat(latency_stats, tmp, sizeof(latency_stats));
|
strlcpy(latency_stats, "LATENCY\n", sizeof(latency_stats));
|
||||||
|
strlcat(latency_stats, tmp, sizeof(latency_stats));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
snprintf(video_info.stat_text,
|
snprintf(video_info.stat_text,
|
||||||
sizeof(video_info.stat_text),
|
sizeof(video_info.stat_text),
|
||||||
"CORE AV_INFO\n"
|
"CORE AV_INFO\n"
|
||||||
|
@ -1008,20 +1008,19 @@ static int menu_cbs_init_bind_left_compare_label(menu_file_list_cbs_t *cbs,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( string_starts_with_size(label, "input_player", STRLEN_CONST("input_player")) &&
|
if ( string_starts_with_size(label, "input_player", STRLEN_CONST("input_player"))
|
||||||
string_ends_with_size(label, "_joypad_index", strlen(label),
|
&& string_ends_with_size(label, "_joypad_index", strlen(label),
|
||||||
STRLEN_CONST("_joypad_index")))
|
STRLEN_CONST("_joypad_index")))
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
char lbl_setting[128];
|
||||||
|
size_t _len = strlcpy(lbl_setting, "input_player", sizeof(lbl_setting));
|
||||||
for (i = 0; i < MAX_USERS; i++)
|
for (i = 0; i < MAX_USERS; i++)
|
||||||
{
|
{
|
||||||
char label_setting[128];
|
snprintf(lbl_setting + _len, sizeof(lbl_setting) - _len, "%d", i + 1);
|
||||||
label_setting[0] = '\0';
|
strlcat(lbl_setting, "_joypad_index", sizeof(lbl_setting));
|
||||||
|
|
||||||
snprintf(label_setting,
|
if (!string_is_equal(label, lbl_setting))
|
||||||
sizeof(label_setting), "input_player%d_joypad_index", i + 1);
|
|
||||||
|
|
||||||
if (!string_is_equal(label, label_setting))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
BIND_ACTION_LEFT(cbs, bind_left_generic);
|
BIND_ACTION_LEFT(cbs, bind_left_generic);
|
||||||
|
@ -2121,13 +2121,13 @@ static int generic_action_ok(const char *path,
|
|||||||
case ACTION_OK_LOAD_REMAPPING_FILE:
|
case ACTION_OK_LOAD_REMAPPING_FILE:
|
||||||
#ifdef HAVE_CONFIGFILE
|
#ifdef HAVE_CONFIGFILE
|
||||||
{
|
{
|
||||||
|
char conf_key[64];
|
||||||
config_file_t *conf = config_file_new_from_path_to_string(
|
config_file_t *conf = config_file_new_from_path_to_string(
|
||||||
action_path);
|
action_path);
|
||||||
retro_ctx_controller_info_t pad;
|
retro_ctx_controller_info_t pad;
|
||||||
unsigned current_device = 0;
|
unsigned current_device = 0;
|
||||||
unsigned port = 0;
|
unsigned port = 0;
|
||||||
int conf_val = 0;
|
int conf_val = 0;
|
||||||
char conf_key[64];
|
|
||||||
flush_char = msg_hash_to_str(flush_id);
|
flush_char = msg_hash_to_str(flush_id);
|
||||||
|
|
||||||
conf_key[0] = '\0';
|
conf_key[0] = '\0';
|
||||||
@ -2136,16 +2136,17 @@ static int generic_action_ok(const char *path,
|
|||||||
{
|
{
|
||||||
if (input_remapping_load_file(conf, action_path))
|
if (input_remapping_load_file(conf, action_path))
|
||||||
{
|
{
|
||||||
|
size_t _len = strlcpy(conf_key, "input_libretro_device_p", sizeof(conf_key));
|
||||||
for (port = 0; port < MAX_USERS; port++)
|
for (port = 0; port < MAX_USERS; port++)
|
||||||
{
|
{
|
||||||
snprintf(conf_key, sizeof(conf_key), "input_libretro_device_p%u", port + 1);
|
snprintf(conf_key + _len, sizeof(conf_key) - _len, "%u", port + 1);
|
||||||
if (!config_get_int(conf, conf_key, &conf_val))
|
if (!config_get_int(conf, conf_key, &conf_val))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
current_device = input_config_get_device(port);
|
current_device = input_config_get_device(port);
|
||||||
input_config_set_device(port, current_device);
|
input_config_set_device(port, current_device);
|
||||||
pad.port = port;
|
pad.port = port;
|
||||||
pad.device = current_device;
|
pad.device = current_device;
|
||||||
core_set_controller_port_device(&pad);
|
core_set_controller_port_device(&pad);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3693,20 +3694,20 @@ static int action_ok_remap_file_flush(const char *path,
|
|||||||
/* Log result */
|
/* Log result */
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
RARCH_LOG(
|
RARCH_LOG(
|
||||||
"[Remaps]: Saved input remapping options to \"%s\".\n",
|
"[Remaps]: Saved input remapping options to \"%s\".\n",
|
||||||
path_remapfile ? path_remapfile : "UNKNOWN");
|
path_remapfile ? path_remapfile : "UNKNOWN");
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg), "%s \"%s\"",
|
snprintf(msg, sizeof(msg), "%s \"%s\"",
|
||||||
msg_hash_to_str(MSG_REMAP_FILE_FLUSHED),
|
msg_hash_to_str(MSG_REMAP_FILE_FLUSHED),
|
||||||
remapfile);
|
remapfile);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
RARCH_LOG(
|
RARCH_LOG(
|
||||||
"[Remaps]: Failed to save input remapping options to \"%s\".\n",
|
"[Remaps]: Failed to save input remapping options to \"%s\".\n",
|
||||||
path_remapfile ? path_remapfile : "UNKNOWN");
|
path_remapfile ? path_remapfile : "UNKNOWN");
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg), "%s \"%s\"",
|
snprintf(msg, sizeof(msg), "%s \"%s\"",
|
||||||
msg_hash_to_str(MSG_REMAP_FILE_FLUSH_FAILED),
|
msg_hash_to_str(MSG_REMAP_FILE_FLUSH_FAILED),
|
||||||
remapfile);
|
remapfile);
|
||||||
@ -3857,10 +3858,10 @@ static int action_ok_set_switch_cpu_profile(const char *path,
|
|||||||
char command[PATH_MAX_LENGTH] = {0};
|
char command[PATH_MAX_LENGTH] = {0};
|
||||||
#ifdef HAVE_LAKKA_SWITCH
|
#ifdef HAVE_LAKKA_SWITCH
|
||||||
char* profile_name = SWITCH_CPU_PROFILES[entry_idx];
|
char* profile_name = SWITCH_CPU_PROFILES[entry_idx];
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
snprintf(command, sizeof(command), "cpu-profile set '%s'", profile_name);
|
snprintf(command, sizeof(command), "cpu-profile set '%s'", profile_name);
|
||||||
|
|
||||||
system(command);
|
system(command);
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
snprintf(command, sizeof(command), "Current profile set to %s", profile_name);
|
snprintf(command, sizeof(command), "Current profile set to %s", profile_name);
|
||||||
#else
|
#else
|
||||||
unsigned profile_clock = SWITCH_CPU_SPEEDS_VALUES[entry_idx];
|
unsigned profile_clock = SWITCH_CPU_SPEEDS_VALUES[entry_idx];
|
||||||
@ -3877,6 +3878,7 @@ static int action_ok_set_switch_cpu_profile(const char *path,
|
|||||||
clkrstSetClockRate(&session, profile_clock);
|
clkrstSetClockRate(&session, profile_clock);
|
||||||
clkrstCloseSession(&session);
|
clkrstCloseSession(&session);
|
||||||
}
|
}
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
snprintf(command, sizeof(command),
|
snprintf(command, sizeof(command),
|
||||||
"Current Clock set to %i", profile_clock);
|
"Current Clock set to %i", profile_clock);
|
||||||
#endif
|
#endif
|
||||||
@ -3894,23 +3896,15 @@ static int action_ok_set_switch_gpu_profile(const char *path,
|
|||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
char command[PATH_MAX_LENGTH];
|
char command[PATH_MAX_LENGTH];
|
||||||
char *profile_name = SWITCH_GPU_PROFILES[entry_idx];
|
char *profile_name = SWITCH_GPU_PROFILES[entry_idx];
|
||||||
|
size_t _len = strlcpy(command, "gpu-profile set ", sizeof(command));
|
||||||
command[0] = '\0';
|
snprintf(command + _len, sizeof(command) - _len, "'%s'", profile_name);
|
||||||
|
|
||||||
snprintf(command, sizeof(command),
|
|
||||||
"gpu-profile set '%s'",
|
|
||||||
profile_name);
|
|
||||||
|
|
||||||
system(command);
|
system(command);
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
snprintf(command, sizeof(command),
|
strlcpy(command, "Current profile set to ", sizeof(command));
|
||||||
"Current profile set to %s",
|
strlcat(command, profile_name, sizeof(command));
|
||||||
profile_name);
|
|
||||||
|
|
||||||
runloop_msg_queue_push(command, 1, 90, true, NULL,
|
runloop_msg_queue_push(command, 1, 90, true, NULL,
|
||||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4049,7 +4043,6 @@ int action_ok_core_option_dropdown_list(const char *path,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
push_dropdown_list:
|
push_dropdown_list:
|
||||||
|
|
||||||
/* If this option is not a boolean toggle,
|
/* If this option is not a boolean toggle,
|
||||||
* push drop-down list */
|
* push drop-down list */
|
||||||
snprintf(option_path_str, sizeof(option_path_str),
|
snprintf(option_path_str, sizeof(option_path_str),
|
||||||
@ -7167,16 +7160,19 @@ static int action_ok_video_resolution(const char *path,
|
|||||||
video_driver_set_video_mode(width, height, true);
|
video_driver_set_video_mode(width, height, true);
|
||||||
#ifdef GEKKO
|
#ifdef GEKKO
|
||||||
if (width == 0 || height == 0)
|
if (width == 0 || height == 0)
|
||||||
snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_SCREEN_RESOLUTION_APPLYING_DEFAULT));
|
snprintf(msg, sizeof(msg),
|
||||||
|
msg_hash_to_str(MSG_SCREEN_RESOLUTION_APPLYING_DEFAULT));
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if (!string_is_empty(desc))
|
if (!string_is_empty(desc))
|
||||||
snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_SCREEN_RESOLUTION_APPLYING_DESC),
|
snprintf(msg, sizeof(msg),
|
||||||
width, height, desc);
|
msg_hash_to_str(MSG_SCREEN_RESOLUTION_APPLYING_DESC),
|
||||||
|
width, height, desc);
|
||||||
else
|
else
|
||||||
snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_SCREEN_RESOLUTION_APPLYING_NO_DESC),
|
snprintf(msg, sizeof(msg),
|
||||||
width, height);
|
msg_hash_to_str(MSG_SCREEN_RESOLUTION_APPLYING_NO_DESC),
|
||||||
|
width, height);
|
||||||
}
|
}
|
||||||
runloop_msg_queue_push(msg, 1, 100, true, NULL,
|
runloop_msg_queue_push(msg, 1, 100, true, NULL,
|
||||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||||
|
@ -1136,19 +1136,19 @@ static int menu_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *cbs,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( string_starts_with_size(label, "input_player", STRLEN_CONST("input_player")) &&
|
if ( string_starts_with_size(label, "input_player", STRLEN_CONST("input_player"))
|
||||||
string_ends_with_size(label, "_joypad_index", strlen(label),
|
&& string_ends_with_size(label, "_joypad_index", strlen(label),
|
||||||
STRLEN_CONST("_joypad_index")))
|
STRLEN_CONST("_joypad_index")))
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
char lbl_setting[128];
|
||||||
|
size_t _len = strlcpy(lbl_setting, "input_player", sizeof(lbl_setting));
|
||||||
for (i = 0; i < MAX_USERS; i++)
|
for (i = 0; i < MAX_USERS; i++)
|
||||||
{
|
{
|
||||||
char label_setting[128];
|
snprintf(lbl_setting + _len, sizeof(lbl_setting) - _len, "%d", i + 1);
|
||||||
label_setting[0] = '\0';
|
strlcat(lbl_setting, "_joypad_index", sizeof(lbl_setting));
|
||||||
|
|
||||||
snprintf(label_setting, sizeof(label_setting), "input_player%d_joypad_index", i + 1);
|
if (!string_is_equal(label, lbl_setting))
|
||||||
|
|
||||||
if (!string_is_equal(label, label_setting))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
BIND_ACTION_RIGHT(cbs, bind_right_generic);
|
BIND_ACTION_RIGHT(cbs, bind_right_generic);
|
||||||
@ -1162,8 +1162,8 @@ static int menu_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *cbs,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( strstr(label, "rdb_entry") ||
|
if ( strstr(label, "rdb_entry")
|
||||||
string_starts_with_size(label, "content_info", STRLEN_CONST("content_info")))
|
|| string_starts_with_size(label, "content_info", STRLEN_CONST("content_info")))
|
||||||
{
|
{
|
||||||
BIND_ACTION_RIGHT(cbs, action_right_scroll);
|
BIND_ACTION_RIGHT(cbs, action_right_scroll);
|
||||||
}
|
}
|
||||||
|
@ -1282,10 +1282,16 @@ static int action_bind_sublabel_systeminfo_controller_entry(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(tmp, sizeof(tmp), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PORT_DEVICE_INFO),
|
snprintf(tmp, sizeof(tmp),
|
||||||
input_config_get_device_display_name(controller) ? input_config_get_device_display_name(controller) : msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE),
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PORT_DEVICE_INFO),
|
||||||
input_config_get_device_display_name(controller) ? input_config_get_device_config_name(controller) : msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE),
|
input_config_get_device_display_name(controller)
|
||||||
input_config_get_device_vid(controller), input_config_get_device_pid(controller));
|
? input_config_get_device_display_name(controller)
|
||||||
|
: msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE),
|
||||||
|
input_config_get_device_display_name(controller)
|
||||||
|
? input_config_get_device_config_name(controller)
|
||||||
|
: msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE),
|
||||||
|
input_config_get_device_vid(controller),
|
||||||
|
input_config_get_device_pid(controller));
|
||||||
strlcpy(s, tmp, len);
|
strlcpy(s, tmp, len);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -1316,8 +1322,9 @@ static int action_bind_sublabel_cpu_policy_entry_list(
|
|||||||
int idx = atoi(path);
|
int idx = atoi(path);
|
||||||
if (drivers)
|
if (drivers)
|
||||||
{
|
{
|
||||||
snprintf(s, len, "%s | Freq: %u MHz\n", drivers[idx]->scaling_governor,
|
size_t _len = strlcpy(s, drivers[idx]->scaling_governor, len);
|
||||||
drivers[idx]->current_frequency / 1000);
|
snprintf(s + _len, len - _len, " | Freq: %u MHz\n",
|
||||||
|
drivers[idx]->current_frequency / 1000);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1370,10 +1377,11 @@ static int action_bind_sublabel_subsystem_add(
|
|||||||
if (subsystem && runloop_st->subsystem_current_count > 0)
|
if (subsystem && runloop_st->subsystem_current_count > 0)
|
||||||
{
|
{
|
||||||
if (content_get_subsystem_rom_id() < subsystem->num_roms)
|
if (content_get_subsystem_rom_id() < subsystem->num_roms)
|
||||||
snprintf(s, len, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SUBSYSTEM_CONTENT_INFO),
|
snprintf(s, len,
|
||||||
content_get_subsystem() == type - MENU_SETTINGS_SUBSYSTEM_ADD
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SUBSYSTEM_CONTENT_INFO),
|
||||||
? subsystem->roms[content_get_subsystem_rom_id()].desc
|
(content_get_subsystem() == type - MENU_SETTINGS_SUBSYSTEM_ADD)
|
||||||
: subsystem->roms[0].desc);
|
? subsystem->roms[content_get_subsystem_rom_id()].desc
|
||||||
|
: subsystem->roms[0].desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -1431,13 +1439,12 @@ static int action_bind_sublabel_remap_kbd_sublabel(
|
|||||||
unsigned user_idx = (type - MENU_SETTINGS_INPUT_DESC_KBD_BEGIN) / RARCH_ANALOG_BIND_LIST_END;
|
unsigned user_idx = (type - MENU_SETTINGS_INPUT_DESC_KBD_BEGIN) / RARCH_ANALOG_BIND_LIST_END;
|
||||||
size_t _len = strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PORT),
|
size_t _len = strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PORT),
|
||||||
len);
|
len);
|
||||||
snprintf(s + _len, len - _len, " %u: %s",
|
snprintf(s + _len, len - _len, " %u: %s", user_idx + 1,
|
||||||
user_idx + 1,
|
input_config_get_device_display_name(user_idx)
|
||||||
input_config_get_device_display_name(user_idx) ?
|
? input_config_get_device_display_name(user_idx)
|
||||||
input_config_get_device_display_name(user_idx) :
|
: (input_config_get_device_name(user_idx)
|
||||||
(input_config_get_device_name(user_idx) ?
|
? input_config_get_device_name(user_idx)
|
||||||
input_config_get_device_name(user_idx) :
|
: msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE)));
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE)));
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1448,6 +1455,7 @@ static int action_bind_sublabel_audio_mixer_stream(
|
|||||||
const char *label, const char *path,
|
const char *label, const char *path,
|
||||||
char *s, size_t len)
|
char *s, size_t len)
|
||||||
{
|
{
|
||||||
|
size_t _len;
|
||||||
char msg[64];
|
char msg[64];
|
||||||
unsigned offset = (type - MENU_SETTINGS_AUDIO_MIXER_STREAM_BEGIN);
|
unsigned offset = (type - MENU_SETTINGS_AUDIO_MIXER_STREAM_BEGIN);
|
||||||
audio_mixer_stream_t *stream = audio_driver_mixer_get_stream(offset);
|
audio_mixer_stream_t *stream = audio_driver_mixer_get_stream(offset);
|
||||||
@ -1484,7 +1492,8 @@ static int action_bind_sublabel_audio_mixer_stream(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(s, len, "%s | %s: %.2f dB", msg,
|
_len = strlcpy(s, msg, len);
|
||||||
|
snprintf(s + _len, len - _len, " | %s: %.2f dB",
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_VOLUME),
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MIXER_ACTION_VOLUME),
|
||||||
stream->volume);
|
stream->volume);
|
||||||
return 0;
|
return 0;
|
||||||
@ -1511,16 +1520,15 @@ static int action_bind_sublabel_remap_sublabel(
|
|||||||
* the port to which the corresponding
|
* the port to which the corresponding
|
||||||
* controller is connected... */
|
* controller is connected... */
|
||||||
port = settings->uints.input_joypad_index[port];
|
port = settings->uints.input_joypad_index[port];
|
||||||
|
|
||||||
_len = strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PORT), len);
|
_len = strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PORT), len);
|
||||||
|
|
||||||
snprintf(s + _len, len - _len, " %u: %s",
|
snprintf(s + _len, len - _len, " %u: %s",
|
||||||
port + 1,
|
port + 1,
|
||||||
input_config_get_device_display_name(port) ?
|
input_config_get_device_display_name(port)
|
||||||
input_config_get_device_display_name(port) :
|
? input_config_get_device_display_name(port)
|
||||||
(input_config_get_device_name(port) ?
|
: (input_config_get_device_name(port)
|
||||||
input_config_get_device_name(port) :
|
? input_config_get_device_name(port)
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE)));
|
: msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE)));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1587,6 +1595,7 @@ static int action_bind_sublabel_netplay_room(file_list_t *list,
|
|||||||
const char *label, const char *path,
|
const char *label, const char *path,
|
||||||
char *s, size_t len)
|
char *s, size_t len)
|
||||||
{
|
{
|
||||||
|
size_t _len;
|
||||||
char buf[512];
|
char buf[512];
|
||||||
struct netplay_room *room;
|
struct netplay_room *room;
|
||||||
net_driver_state_t *net_st = networking_state_get_ptr();
|
net_driver_state_t *net_st = networking_state_get_ptr();
|
||||||
@ -1596,12 +1605,12 @@ static int action_bind_sublabel_netplay_room(file_list_t *list,
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
room = &net_st->room_list[room_index];
|
room = &net_st->room_list[room_index];
|
||||||
|
_len = strlcpy(s, msg_hash_to_str(MSG_PROGRAM), len);
|
||||||
|
|
||||||
snprintf(s, len,
|
snprintf(s + _len, len - _len,
|
||||||
"%s: %s (%s)\n"
|
": %s (%s)\n"
|
||||||
"%s: %s (%s)\n"
|
"%s: %s (%s)\n"
|
||||||
"%s: %s ",
|
"%s: %s ",
|
||||||
msg_hash_to_str(MSG_PROGRAM),
|
|
||||||
!string_is_empty(room->retroarch_version) ? room->retroarch_version :
|
!string_is_empty(room->retroarch_version) ? room->retroarch_version :
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE),
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE),
|
||||||
(!string_is_empty(room->frontend) &&
|
(!string_is_empty(room->frontend) &&
|
||||||
@ -1616,13 +1625,12 @@ static int action_bind_sublabel_netplay_room(file_list_t *list,
|
|||||||
room->gamename :
|
room->gamename :
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE));
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE));
|
||||||
|
|
||||||
if (string_is_empty(room->subsystem_name) ||
|
if ( string_is_empty(room->subsystem_name)
|
||||||
string_is_equal_case_insensitive(room->subsystem_name, "N/A"))
|
|| string_is_equal_case_insensitive(room->subsystem_name, "N/A"))
|
||||||
snprintf(buf, sizeof(buf), "(%08lX)",
|
snprintf(buf, sizeof(buf), "(%08lX)",
|
||||||
(unsigned long)(unsigned)room->gamecrc);
|
(unsigned long)(unsigned)room->gamecrc);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
size_t _len;
|
|
||||||
buf[0 ] = '(';
|
buf[0 ] = '(';
|
||||||
buf[1 ] = '\0';
|
buf[1 ] = '\0';
|
||||||
_len = strlcat(buf, room->subsystem_name, sizeof(buf));
|
_len = strlcat(buf, room->subsystem_name, sizeof(buf));
|
||||||
@ -5234,17 +5242,15 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
|||||||
strlen(label), STRLEN_CONST("_analog_dpad_mode")))
|
strlen(label), STRLEN_CONST("_analog_dpad_mode")))
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
char key_input_adc_type[64];
|
||||||
|
size_t _len = strlcpy(key_input_adc_type, "input_player", sizeof(key_input_adc_type));
|
||||||
for (i = 0; i < MAX_USERS; i++)
|
for (i = 0; i < MAX_USERS; i++)
|
||||||
{
|
{
|
||||||
char key_input_adc_type[64];
|
snprintf(key_input_adc_type + _len,
|
||||||
key_input_adc_type[0] = '\0';
|
sizeof(key_input_adc_type) - _len, "%u", i + 1);
|
||||||
|
strlcat(key_input_adc_type, "_analog_dpad_mode", sizeof(key_input_adc_type));
|
||||||
snprintf(key_input_adc_type, sizeof(key_input_adc_type),
|
|
||||||
"input_player%u_analog_dpad_mode", i + 1);
|
|
||||||
|
|
||||||
if (!string_is_equal(label, key_input_adc_type))
|
if (!string_is_equal(label, key_input_adc_type))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_adc_type);
|
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_adc_type);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1886,10 +1886,11 @@ static unsigned menu_displaylist_parse_system_info(file_list_t *list)
|
|||||||
if (frontend->get_os)
|
if (frontend->get_os)
|
||||||
{
|
{
|
||||||
frontend->get_os(tmp2, sizeof(tmp2), &major, &minor);
|
frontend->get_os(tmp2, sizeof(tmp2), &major, &minor);
|
||||||
snprintf(tmp, sizeof(tmp), "%s: %s (v%d.%d)",
|
len = strlcpy(tmp,
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_FRONTEND_OS),
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_FRONTEND_OS),
|
||||||
tmp2,
|
sizeof(tmp));
|
||||||
major, minor);
|
snprintf(tmp + len, sizeof(tmp) - len, ": %s (v%d.%d)",
|
||||||
|
tmp2, major, minor);
|
||||||
if (menu_entries_append(list, tmp, "",
|
if (menu_entries_append(list, tmp, "",
|
||||||
MENU_ENUM_LABEL_SYSTEM_INFO_ENTRY,
|
MENU_ENUM_LABEL_SYSTEM_INFO_ENTRY,
|
||||||
MENU_SETTINGS_CORE_INFO_NONE, 0, 0, NULL))
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0, NULL))
|
||||||
@ -1898,9 +1899,11 @@ static unsigned menu_displaylist_parse_system_info(file_list_t *list)
|
|||||||
|
|
||||||
if (frontend->get_rating)
|
if (frontend->get_rating)
|
||||||
{
|
{
|
||||||
snprintf(tmp, sizeof(tmp), "%s: %d",
|
len = strlcpy(tmp,
|
||||||
msg_hash_to_str(
|
msg_hash_to_str(
|
||||||
MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_RETRORATING_LEVEL),
|
MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_RETRORATING_LEVEL),
|
||||||
|
sizeof(tmp));
|
||||||
|
snprintf(tmp + len, sizeof(tmp) - len, ": %d",
|
||||||
frontend->get_rating());
|
frontend->get_rating());
|
||||||
if (menu_entries_append(list, tmp, "",
|
if (menu_entries_append(list, tmp, "",
|
||||||
MENU_ENUM_LABEL_SYSTEM_INFO_ENTRY,
|
MENU_ENUM_LABEL_SYSTEM_INFO_ENTRY,
|
||||||
@ -2047,10 +2050,11 @@ static unsigned menu_displaylist_parse_system_info(file_list_t *list)
|
|||||||
|
|
||||||
if (video_context_driver_get_metrics(&metrics))
|
if (video_context_driver_get_metrics(&metrics))
|
||||||
{
|
{
|
||||||
snprintf(tmp, sizeof(tmp), "%s: %.2f",
|
len = strlcpy(tmp,
|
||||||
msg_hash_to_str(
|
msg_hash_to_str(
|
||||||
MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_DISPLAY_METRIC_MM_HEIGHT),
|
MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_DISPLAY_METRIC_MM_HEIGHT),
|
||||||
val);
|
sizeof(tmp));
|
||||||
|
snprintf(tmp + len, sizeof(tmp) - len, ": %.2f", val);
|
||||||
if (menu_entries_append(list, tmp, "",
|
if (menu_entries_append(list, tmp, "",
|
||||||
MENU_ENUM_LABEL_SYSTEM_INFO_ENTRY,
|
MENU_ENUM_LABEL_SYSTEM_INFO_ENTRY,
|
||||||
MENU_SETTINGS_CORE_INFO_NONE, 0, 0, NULL))
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0, NULL))
|
||||||
@ -2061,10 +2065,11 @@ static unsigned menu_displaylist_parse_system_info(file_list_t *list)
|
|||||||
|
|
||||||
if (video_context_driver_get_metrics(&metrics))
|
if (video_context_driver_get_metrics(&metrics))
|
||||||
{
|
{
|
||||||
snprintf(tmp, sizeof(tmp), "%s: %.2f",
|
len = strlcpy(tmp,
|
||||||
msg_hash_to_str(
|
msg_hash_to_str(
|
||||||
MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_DISPLAY_METRIC_DPI),
|
MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_DISPLAY_METRIC_DPI),
|
||||||
val);
|
sizeof(tmp));
|
||||||
|
snprintf(tmp + len, sizeof(tmp) - len, ": %.2f", val);
|
||||||
if (menu_entries_append(list, tmp, "",
|
if (menu_entries_append(list, tmp, "",
|
||||||
MENU_ENUM_LABEL_SYSTEM_INFO_ENTRY,
|
MENU_ENUM_LABEL_SYSTEM_INFO_ENTRY,
|
||||||
MENU_SETTINGS_CORE_INFO_NONE, 0, 0, NULL))
|
MENU_SETTINGS_CORE_INFO_NONE, 0, 0, NULL))
|
||||||
@ -4136,18 +4141,20 @@ static unsigned menu_displaylist_parse_playlists(
|
|||||||
#if defined(HAVE_LIBRETRODB)
|
#if defined(HAVE_LIBRETRODB)
|
||||||
if (settings->bools.menu_content_show_explore)
|
if (settings->bools.menu_content_show_explore)
|
||||||
{
|
{
|
||||||
/* list any custom explore views above playlists */
|
char label[512];
|
||||||
|
size_t _len = strlcpy(label, msg_hash_to_str(MENU_ENUM_LABEL_EXPLORE_VIEW),
|
||||||
|
sizeof(label));
|
||||||
|
|
||||||
|
/* List any custom explore views above playlists */
|
||||||
for (i = 0; i < list_size; i++)
|
for (i = 0; i < list_size; i++)
|
||||||
{
|
{
|
||||||
char label[512];
|
|
||||||
const char *path = str_list.elems[i].data;
|
const char *path = str_list.elems[i].data;
|
||||||
const char *fname = path_basename(path);
|
const char *fname = path_basename(path);
|
||||||
const char *fext = path_get_extension(fname);
|
const char *fext = path_get_extension(fname);
|
||||||
if (!string_is_equal_noncase(fext, "lvw"))
|
if (!string_is_equal_noncase(fext, "lvw"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
snprintf(label, sizeof(label), "%s: %.*s",
|
snprintf(label + _len, sizeof(label) - _len, ": %.*s",
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_EXPLORE_VIEW),
|
|
||||||
(int)(fext - 1 - fname), fname);
|
(int)(fext - 1 - fname), fname);
|
||||||
if (menu_entries_append(info_list, label, path,
|
if (menu_entries_append(info_list, label, path,
|
||||||
MENU_ENUM_LABEL_GOTO_EXPLORE,
|
MENU_ENUM_LABEL_GOTO_EXPLORE,
|
||||||
@ -5366,8 +5373,7 @@ static int menu_displaylist_parse_input_description_list(
|
|||||||
* We need to record the current user/button indices,
|
* We need to record the current user/button indices,
|
||||||
* and so have to convert 'info->type' to a string
|
* and so have to convert 'info->type' to a string
|
||||||
* and pass it as the entry label... */
|
* and pass it as the entry label... */
|
||||||
snprintf(entry_label, sizeof(entry_label),
|
snprintf(entry_label, sizeof(entry_label), "%u", info->type);
|
||||||
"%u", info->type);
|
|
||||||
|
|
||||||
/* Loop over core input definitions */
|
/* Loop over core input definitions */
|
||||||
for (j = 0; j < RARCH_CUSTOM_BIND_LIST_END; j++)
|
for (j = 0; j < RARCH_CUSTOM_BIND_LIST_END; j++)
|
||||||
@ -5962,17 +5968,16 @@ static int menu_displaylist_parse_disc_info(file_list_t *info_list,
|
|||||||
char drive_string[256] = {0};
|
char drive_string[256] = {0};
|
||||||
size_t pos = snprintf(drive_string, sizeof(drive_string),
|
size_t pos = snprintf(drive_string, sizeof(drive_string),
|
||||||
msg_drive_number, i + 1);
|
msg_drive_number, i + 1);
|
||||||
pos += snprintf(drive_string + pos, sizeof(drive_string) - pos, ": %s", list->elems[i].data);
|
pos += snprintf(drive_string + pos,
|
||||||
|
sizeof(drive_string) - pos,
|
||||||
|
": %s", list->elems[i].data);
|
||||||
|
|
||||||
drive[0] = list->elems[i].attr.i;
|
drive[0] = list->elems[i].attr.i;
|
||||||
drive[1] = '\0';
|
drive[1] = '\0';
|
||||||
|
|
||||||
if (menu_entries_append(info_list,
|
if (menu_entries_append(info_list,
|
||||||
drive_string,
|
drive_string, drive, MSG_UNKNOWN,
|
||||||
drive,
|
type, 0, i, NULL))
|
||||||
MSG_UNKNOWN,
|
|
||||||
type,
|
|
||||||
0, i, NULL))
|
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6795,6 +6800,8 @@ unsigned menu_displaylist_build_list(
|
|||||||
case DISPLAYLIST_AUDIO_MIXER_SETTINGS_LIST:
|
case DISPLAYLIST_AUDIO_MIXER_SETTINGS_LIST:
|
||||||
{
|
{
|
||||||
#ifdef HAVE_AUDIOMIXER
|
#ifdef HAVE_AUDIOMIXER
|
||||||
|
char msg_lbl[128];
|
||||||
|
size_t _len = strlcpy(msg_lbl, "audio_mixer_stream_", sizeof(msg_lbl));
|
||||||
#if 1
|
#if 1
|
||||||
/* TODO - for developers -
|
/* TODO - for developers -
|
||||||
* turn this into #if 0 if you want to be able to see
|
* turn this into #if 0 if you want to be able to see
|
||||||
@ -6805,11 +6812,9 @@ unsigned menu_displaylist_build_list(
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
char msg[128];
|
char msg[128];
|
||||||
char msg_lbl[128];
|
|
||||||
snprintf(msg, sizeof(msg), msg_hash_to_str(MENU_ENUM_LABEL_MIXER_STREAM), i+1, "\n");
|
snprintf(msg, sizeof(msg), msg_hash_to_str(MENU_ENUM_LABEL_MIXER_STREAM), i+1, "\n");
|
||||||
snprintf(msg_lbl, sizeof(msg_lbl), "audio_mixer_stream_%d\n", i);
|
snprintf(msg_lbl + _len, sizeof(msg_lbl) - _len, "%d\n", i);
|
||||||
if (menu_entries_append(list, msg, msg_lbl,
|
if (menu_entries_append(list, msg, msg_lbl, MSG_UNKNOWN,
|
||||||
MSG_UNKNOWN,
|
|
||||||
(MENU_SETTINGS_AUDIO_MIXER_STREAM_BEGIN + i),
|
(MENU_SETTINGS_AUDIO_MIXER_STREAM_BEGIN + i),
|
||||||
0, 0, NULL))
|
0, 0, NULL))
|
||||||
count++;
|
count++;
|
||||||
@ -7572,8 +7577,8 @@ unsigned menu_displaylist_build_list(
|
|||||||
|
|
||||||
for (i = 0; i < interfaces.size; i++)
|
for (i = 0; i < interfaces.size; i++)
|
||||||
{
|
{
|
||||||
struct net_ifinfo_entry *entry = &interfaces.entries[i];
|
|
||||||
char host_trimmed[64];
|
char host_trimmed[64];
|
||||||
|
struct net_ifinfo_entry *entry = &interfaces.entries[i];
|
||||||
|
|
||||||
/* Trim "%"-suffix from host */
|
/* Trim "%"-suffix from host */
|
||||||
strlcpy(host_trimmed, entry->host, sizeof(host_trimmed));
|
strlcpy(host_trimmed, entry->host, sizeof(host_trimmed));
|
||||||
@ -7597,13 +7602,15 @@ unsigned menu_displaylist_build_list(
|
|||||||
#ifdef HAVE_CHEATS
|
#ifdef HAVE_CHEATS
|
||||||
if (cheat_manager_alloc_if_empty())
|
if (cheat_manager_alloc_if_empty())
|
||||||
{
|
{
|
||||||
|
unsigned i;
|
||||||
|
size_t _len;
|
||||||
|
char cheat_label[128];
|
||||||
|
char on_string[32];
|
||||||
|
char off_string[32];
|
||||||
menu_search_terms_t *search_terms= menu_entries_search_get_terms();
|
menu_search_terms_t *search_terms= menu_entries_search_get_terms();
|
||||||
bool search_active = search_terms && (search_terms->size > 0);
|
bool search_active = search_terms && (search_terms->size > 0);
|
||||||
unsigned num_cheats = cheat_manager_get_size();
|
unsigned num_cheats = cheat_manager_get_size();
|
||||||
unsigned num_cheats_shown = 0;
|
unsigned num_cheats_shown = 0;
|
||||||
unsigned i;
|
|
||||||
char on_string[32];
|
|
||||||
char off_string[32];
|
|
||||||
|
|
||||||
on_string[0] = '\0';
|
on_string[0] = '\0';
|
||||||
off_string[0] = '\0';
|
off_string[0] = '\0';
|
||||||
@ -7692,15 +7699,13 @@ unsigned menu_displaylist_build_list(
|
|||||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
|
_len = strlcpy(cheat_label, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEAT), sizeof(cheat_label));
|
||||||
|
|
||||||
for (i = 0; i < num_cheats; i++)
|
for (i = 0; i < num_cheats; i++)
|
||||||
{
|
{
|
||||||
const char *cheat_description = cheat_manager_get_desc(i);
|
const char *cheat_description = cheat_manager_get_desc(i);
|
||||||
char cheat_label[128];
|
|
||||||
|
|
||||||
cheat_label[0] = '\0';
|
snprintf(cheat_label + _len, sizeof(cheat_label) + _len, " #%u: ", i);
|
||||||
|
|
||||||
snprintf(cheat_label, sizeof(cheat_label),
|
|
||||||
"%s #%u: ", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEAT), i);
|
|
||||||
if (!string_is_empty(cheat_description))
|
if (!string_is_empty(cheat_description))
|
||||||
strlcat(cheat_label, cheat_description, sizeof(cheat_label));
|
strlcat(cheat_label, cheat_description, sizeof(cheat_label));
|
||||||
|
|
||||||
@ -7708,8 +7713,8 @@ unsigned menu_displaylist_build_list(
|
|||||||
* entries */
|
* entries */
|
||||||
if (search_active)
|
if (search_active)
|
||||||
{
|
{
|
||||||
bool entry_valid = true;
|
|
||||||
size_t j;
|
size_t j;
|
||||||
|
bool entry_valid = true;
|
||||||
|
|
||||||
for (j = 0; j < search_terms->size; j++)
|
for (j = 0; j < search_terms->size; j++)
|
||||||
{
|
{
|
||||||
@ -8104,12 +8109,12 @@ unsigned menu_displaylist_build_list(
|
|||||||
{
|
{
|
||||||
if (disk_control_enabled(&sys_info->disk_control))
|
if (disk_control_enabled(&sys_info->disk_control))
|
||||||
{
|
{
|
||||||
|
unsigned i;
|
||||||
unsigned num_images =
|
unsigned num_images =
|
||||||
disk_control_get_num_images(&sys_info->disk_control);
|
disk_control_get_num_images(&sys_info->disk_control);
|
||||||
unsigned current_image =
|
unsigned current_image =
|
||||||
disk_control_get_image_index(&sys_info->disk_control);
|
disk_control_get_image_index(&sys_info->disk_control);
|
||||||
unsigned num_digits = 0;
|
unsigned num_digits = 0;
|
||||||
unsigned i;
|
|
||||||
|
|
||||||
/* If core supports labels, index value string
|
/* If core supports labels, index value string
|
||||||
* should be padded to maximum width (otherwise
|
* should be padded to maximum width (otherwise
|
||||||
@ -8121,8 +8126,7 @@ unsigned menu_displaylist_build_list(
|
|||||||
{
|
{
|
||||||
num_digits++;
|
num_digits++;
|
||||||
digit_counter = digit_counter / 10;
|
digit_counter = digit_counter / 10;
|
||||||
}
|
} while (digit_counter > 0);
|
||||||
while (digit_counter > 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Loop through disk images */
|
/* Loop through disk images */
|
||||||
@ -8377,19 +8381,17 @@ unsigned menu_displaylist_build_list(
|
|||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
cheat_label[0] = '\0';
|
||||||
cheat_label[0] = '\0';
|
snprintf(cheat_label, sizeof(cheat_label),
|
||||||
snprintf(cheat_label, sizeof(cheat_label),
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEAT_ADD_MATCHES),
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEAT_ADD_MATCHES),
|
cheat_manager_state.num_matches);
|
||||||
cheat_manager_state.num_matches);
|
|
||||||
|
|
||||||
if (menu_entries_append(list,
|
if (menu_entries_append(list,
|
||||||
cheat_label,
|
cheat_label,
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_ADD_MATCHES),
|
msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_ADD_MATCHES),
|
||||||
MENU_ENUM_LABEL_CHEAT_ADD_MATCHES,
|
MENU_ENUM_LABEL_CHEAT_ADD_MATCHES,
|
||||||
MENU_SETTING_ACTION, 0, 0, NULL))
|
MENU_SETTING_ACTION, 0, 0, NULL))
|
||||||
count++;
|
count++;
|
||||||
}
|
|
||||||
|
|
||||||
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
|
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
|
||||||
MENU_ENUM_LABEL_CHEAT_DELETE_MATCH,
|
MENU_ENUM_LABEL_CHEAT_DELETE_MATCH,
|
||||||
@ -8409,14 +8411,15 @@ unsigned menu_displaylist_build_list(
|
|||||||
|
|
||||||
cheat_label[0] = '\0';
|
cheat_label[0] = '\0';
|
||||||
|
|
||||||
cheat_manager_match_action(CHEAT_MATCH_ACTION_TYPE_VIEW, cheat_manager_state.match_idx, &address, &address_mask, &prev_val, &curr_val) ;
|
cheat_manager_match_action(CHEAT_MATCH_ACTION_TYPE_VIEW,
|
||||||
|
cheat_manager_state.match_idx,
|
||||||
|
&address, &address_mask, &prev_val, &curr_val) ;
|
||||||
snprintf(cheat_label, sizeof(cheat_label),
|
snprintf(cheat_label, sizeof(cheat_label),
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEAT_MATCH), address, address_mask);
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEAT_MATCH),
|
||||||
|
address, address_mask);
|
||||||
|
|
||||||
if (menu_entries_append(list,
|
if (menu_entries_append(list,
|
||||||
cheat_label,
|
cheat_label, "", MSG_UNKNOWN,
|
||||||
"",
|
|
||||||
MSG_UNKNOWN,
|
|
||||||
MENU_SETTINGS_CHEAT_MATCH, 0, 0, NULL))
|
MENU_SETTINGS_CHEAT_MATCH, 0, 0, NULL))
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
@ -8429,13 +8432,11 @@ unsigned menu_displaylist_build_list(
|
|||||||
{
|
{
|
||||||
rarch_setting_t *setting = menu_setting_find_enum(MENU_ENUM_LABEL_CHEAT_DELETE_MATCH);
|
rarch_setting_t *setting = menu_setting_find_enum(MENU_ENUM_LABEL_CHEAT_DELETE_MATCH);
|
||||||
if (setting)
|
if (setting)
|
||||||
setting->max = cheat_manager_state.num_matches-1;
|
setting->max = cheat_manager_state.num_matches-1;
|
||||||
setting = menu_setting_find_enum(MENU_ENUM_LABEL_CHEAT_COPY_MATCH);
|
if ((setting = menu_setting_find_enum(MENU_ENUM_LABEL_CHEAT_COPY_MATCH)))
|
||||||
if (setting)
|
setting->max = cheat_manager_state.num_matches-1;
|
||||||
setting->max = cheat_manager_state.num_matches-1;
|
if ((setting = menu_setting_find_enum(MENU_ENUM_LABEL_CHEAT_BROWSE_MEMORY)))
|
||||||
setting = menu_setting_find_enum(MENU_ENUM_LABEL_CHEAT_BROWSE_MEMORY);
|
setting->max = cheat_manager_state.total_memory_size>0?cheat_manager_state.total_memory_size-1:0 ;
|
||||||
if (setting)
|
|
||||||
setting->max = cheat_manager_state.total_memory_size>0?cheat_manager_state.total_memory_size-1:0 ;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -11374,7 +11375,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
if (selection >= count)
|
if (selection >= count)
|
||||||
info->flags |= MD_FLAG_NEED_CLEAR;
|
info->flags |= MD_FLAG_NEED_CLEAR;
|
||||||
}
|
}
|
||||||
@ -11399,23 +11400,20 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
if ((file = filestream_open(file_path, RETRO_VFS_FILE_ACCESS_READ,
|
if ((file = filestream_open(file_path, RETRO_VFS_FILE_ACCESS_READ,
|
||||||
0)))
|
0)))
|
||||||
{
|
{
|
||||||
const cdrom_toc_t *toc = retro_vfs_file_get_cdrom_toc();
|
unsigned i;
|
||||||
|
const cdrom_toc_t *toc = retro_vfs_file_get_cdrom_toc();
|
||||||
unsigned first_data_track = 1;
|
unsigned first_data_track = 1;
|
||||||
|
atip = cdrom_has_atip(
|
||||||
atip = cdrom_has_atip(filestream_get_vfs_handle(file));
|
filestream_get_vfs_handle(file));
|
||||||
|
|
||||||
filestream_close(file);
|
filestream_close(file);
|
||||||
|
|
||||||
|
for (i = 0; i < toc->num_tracks; i++)
|
||||||
{
|
{
|
||||||
unsigned i;
|
if (!toc->track[i].audio)
|
||||||
|
|
||||||
for (i = 0; i < toc->num_tracks; i++)
|
|
||||||
{
|
{
|
||||||
if (!toc->track[i].audio)
|
first_data_track = i + 1;
|
||||||
{
|
break;
|
||||||
first_data_track = i + 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11427,8 +11425,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
{
|
{
|
||||||
if (!string_is_empty(cd_info.title))
|
if (!string_is_empty(cd_info.title))
|
||||||
{
|
{
|
||||||
char title[sizeof("Title: ")+sizeof(cd_info.title)];
|
char title[sizeof("Title: ") + sizeof(cd_info.title)]; /* TODO/FIXME - C89 compliance */
|
||||||
snprintf(title, sizeof(title), "Title: %s", cd_info.title);
|
strlcpy(title, "Title: ", sizeof(title));
|
||||||
|
strlcat(title, cd_info.title, sizeof(title));
|
||||||
|
|
||||||
if (menu_entries_append(info->list,
|
if (menu_entries_append(info->list,
|
||||||
title,
|
title,
|
||||||
@ -11473,10 +11472,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
if (!string_is_empty(cd_info.version))
|
if (!string_is_empty(cd_info.version))
|
||||||
{
|
{
|
||||||
char version[256];
|
char version[256];
|
||||||
/* TODO/FIXME - why are we using a Qt core version string
|
/* TODO/FIXME - localize */
|
||||||
* message here? */
|
strlcpy(version, "Version: ", sizeof(version));
|
||||||
snprintf(version, sizeof(version),
|
strlcat(version, cd_info.version, sizeof(version));
|
||||||
"%s: %s", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_CORE_VERSION), cd_info.version);
|
|
||||||
|
|
||||||
if (menu_entries_append(info->list,
|
if (menu_entries_append(info->list,
|
||||||
version,
|
version,
|
||||||
@ -11585,7 +11583,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
|
|
||||||
cdrom_lba_to_msf(toc->track[i].track_size, &min, &sec, &frame);
|
cdrom_lba_to_msf(toc->track[i].track_size, &min, &sec, &frame);
|
||||||
|
|
||||||
snprintf(length_string + strlen(length_string), sizeof(length_string) - strlen(length_string), "%02d:%02d.%02d", min, sec, frame);
|
snprintf(length_string + strlen(length_string),
|
||||||
|
sizeof(length_string) - strlen(length_string),
|
||||||
|
"%02d:%02d.%02d", min, sec, frame);
|
||||||
|
|
||||||
if (menu_entries_append(info->list,
|
if (menu_entries_append(info->list,
|
||||||
length_string,
|
length_string,
|
||||||
@ -11605,6 +11605,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
RARCH_LOG("[CDROM]: No media is inserted or drive is not ready.\n");
|
RARCH_LOG("[CDROM]: No media is inserted or drive is not ready.\n");
|
||||||
|
|
||||||
runloop_msg_queue_push(
|
runloop_msg_queue_push(
|
||||||
@ -11621,8 +11622,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL);
|
FILE_TYPE_NONE, 0, 0, NULL);
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH
|
| MD_FLAG_NEED_PUSH
|
||||||
| MD_FLAG_NEED_CLEAR;
|
| MD_FLAG_NEED_CLEAR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DISPLAYLIST_LOAD_DISC:
|
case DISPLAYLIST_LOAD_DISC:
|
||||||
@ -11638,8 +11639,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL);
|
FILE_TYPE_NONE, 0, 0, NULL);
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH
|
| MD_FLAG_NEED_PUSH
|
||||||
| MD_FLAG_NEED_CLEAR;
|
| MD_FLAG_NEED_CLEAR;
|
||||||
break;
|
break;
|
||||||
#else
|
#else
|
||||||
case DISPLAYLIST_CDROM_DETAIL_INFO:
|
case DISPLAYLIST_CDROM_DETAIL_INFO:
|
||||||
@ -11760,18 +11761,17 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE *profile = NULL;
|
FILE *profile = NULL;
|
||||||
#endif
|
#endif
|
||||||
const size_t profiles_count = sizeof(SWITCH_CPU_PROFILES)/sizeof(SWITCH_CPU_PROFILES[1]);
|
const size_t profiles_count = sizeof(SWITCH_CPU_PROFILES)/sizeof(SWITCH_CPU_PROFILES[1]);
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
runloop_msg_queue_push("Warning : extended overclocking can damage the Switch", 1, 90, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
runloop_msg_queue_push("Warning : extended overclocking can damage the Switch",
|
||||||
|
1, 90, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
|
|
||||||
#ifdef HAVE_LAKKA_SWITCH
|
#ifdef HAVE_LAKKA_SWITCH
|
||||||
profile = popen("cpu-profile get", "r");
|
profile = popen("cpu-profile get", "r");
|
||||||
fgets(current_profile, PATH_MAX_LENGTH, profile);
|
fgets(current_profile, PATH_MAX_LENGTH, profile);
|
||||||
pclose(profile);
|
pclose(profile);
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
snprintf(text, sizeof(text),
|
snprintf(text, sizeof(text), "Current profile: %s",
|
||||||
"Current profile: %s", current_profile);
|
current_profile);
|
||||||
#else
|
#else
|
||||||
u32 currentClock = 0;
|
u32 currentClock = 0;
|
||||||
if (hosversionBefore(8, 0, 0))
|
if (hosversionBefore(8, 0, 0))
|
||||||
@ -11783,13 +11783,11 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
clkrstGetClockRate(&session, ¤tClock);
|
clkrstGetClockRate(&session, ¤tClock);
|
||||||
clkrstCloseSession(&session);
|
clkrstCloseSession(&session);
|
||||||
}
|
}
|
||||||
snprintf(text, sizeof(text), "Current Clock : %i", currentClock);
|
snprintf(text, sizeof(text), "Current Clock: %i", currentClock);
|
||||||
#endif
|
#endif
|
||||||
if (menu_entries_append(info->list,
|
if (menu_entries_append(info->list,
|
||||||
text,
|
text, "", 0, MENU_INFO_MESSAGE,
|
||||||
"",
|
0, 0, NULL))
|
||||||
0,
|
|
||||||
MENU_INFO_MESSAGE, 0, 0, NULL))
|
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
for (i = 0; i < profiles_count; i++)
|
for (i = 0; i < profiles_count; i++)
|
||||||
@ -11797,21 +11795,17 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
char title[PATH_MAX_LENGTH];
|
char title[PATH_MAX_LENGTH];
|
||||||
char* profile = SWITCH_CPU_PROFILES[i];
|
char* profile = SWITCH_CPU_PROFILES[i];
|
||||||
char* speed = SWITCH_CPU_SPEEDS[i];
|
char* speed = SWITCH_CPU_SPEEDS[i];
|
||||||
title[0] = '\0';
|
size_t _len = strlcpy(title, profile, sizeof(title));
|
||||||
|
snprintf(title + _len, sizeof(title) - _len, " (%s)", speed);
|
||||||
snprintf(title, sizeof(title), "%s (%s)", profile, speed);
|
|
||||||
|
|
||||||
if (menu_entries_append(info->list,
|
if (menu_entries_append(info->list,
|
||||||
title,
|
title, "", 0, MENU_SET_SWITCH_CPU_PROFILE, 0,
|
||||||
"",
|
i, NULL))
|
||||||
0, MENU_SET_SWITCH_CPU_PROFILE, 0, i, NULL))
|
|
||||||
count++;
|
count++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH
|
| MD_FLAG_NEED_PUSH
|
||||||
| MD_FLAG_NEED_CLEAR;
|
| MD_FLAG_NEED_CLEAR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#if defined(HAVE_LAKKA_SWITCH)
|
#if defined(HAVE_LAKKA_SWITCH)
|
||||||
@ -11823,7 +11817,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE *profile = NULL;
|
FILE *profile = NULL;
|
||||||
const size_t profiles_count = sizeof(SWITCH_GPU_PROFILES)/sizeof(SWITCH_GPU_PROFILES[1]);
|
const size_t profiles_count = sizeof(SWITCH_GPU_PROFILES)/sizeof(SWITCH_GPU_PROFILES[1]);
|
||||||
|
|
||||||
runloop_msg_queue_push("Warning : extended overclocking can damage the Switch", 1, 90, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
runloop_msg_queue_push("Warning : extended overclocking can damage the Switch",
|
||||||
|
1, 90, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||||
|
|
||||||
profile = popen("gpu-profile get", "r");
|
profile = popen("gpu-profile get", "r");
|
||||||
fgets(current_profile, PATH_MAX_LENGTH, profile);
|
fgets(current_profile, PATH_MAX_LENGTH, profile);
|
||||||
@ -11832,8 +11827,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
|
|
||||||
/* TODO/FIXME - Localize */
|
/* TODO/FIXME - Localize */
|
||||||
snprintf(text, sizeof(text),
|
strlcpy(text, "Current profile : ", sizeof(text));
|
||||||
"Current profile : %s", current_profile);
|
strlcat(text, current_profile, sizeof(text));
|
||||||
|
|
||||||
if (menu_entries_append(info->list, text, "", 0, MENU_INFO_MESSAGE, 0, 0, NULL))
|
if (menu_entries_append(info->list, text, "", 0, MENU_INFO_MESSAGE, 0, 0, NULL))
|
||||||
count++;
|
count++;
|
||||||
@ -11843,16 +11838,16 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
char title[PATH_MAX_LENGTH];
|
char title[PATH_MAX_LENGTH];
|
||||||
char* profile = SWITCH_GPU_PROFILES[i];
|
char* profile = SWITCH_GPU_PROFILES[i];
|
||||||
char* speed = SWITCH_GPU_SPEEDS[i];
|
char* speed = SWITCH_GPU_SPEEDS[i];
|
||||||
|
size_t _len = strlcpy(title, profile, sizeof(title));
|
||||||
snprintf(title, sizeof(title), "%s (%s)", profile, speed);
|
snprintf(title + _len, sizeof(title)i - _len, " (%s)", speed);
|
||||||
|
|
||||||
if (menu_entries_append(info->list, title, "", 0, MENU_SET_SWITCH_GPU_PROFILE, 0, i, NULL))
|
if (menu_entries_append(info->list, title, "", 0, MENU_SET_SWITCH_GPU_PROFILE, 0, i, NULL))
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH
|
| MD_FLAG_NEED_PUSH
|
||||||
| MD_FLAG_NEED_CLEAR;
|
| MD_FLAG_NEED_CLEAR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif /* HAVE_LAKKA_SWITCH */
|
#endif /* HAVE_LAKKA_SWITCH */
|
||||||
@ -11914,8 +11909,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
MENU_SETTING_NO_ITEM, 0, 0, NULL);
|
MENU_SETTING_NO_ITEM, 0, 0, NULL);
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH
|
| MD_FLAG_NEED_PUSH
|
||||||
| MD_FLAG_NEED_CLEAR;
|
| MD_FLAG_NEED_CLEAR;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_MIXER_STREAM_SETTINGS_LIST:
|
case DISPLAYLIST_MIXER_STREAM_SETTINGS_LIST:
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
@ -12002,8 +11997,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL);
|
FILE_TYPE_NONE, 0, 0, NULL);
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH
|
| MD_FLAG_NEED_PUSH
|
||||||
| MD_FLAG_NEED_CLEAR;
|
| MD_FLAG_NEED_CLEAR;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_NETPLAY_LAN_SCAN_SETTINGS_LIST:
|
case DISPLAYLIST_NETPLAY_LAN_SCAN_SETTINGS_LIST:
|
||||||
case DISPLAYLIST_OPTIONS_MANAGEMENT:
|
case DISPLAYLIST_OPTIONS_MANAGEMENT:
|
||||||
@ -12028,7 +12023,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL);
|
FILE_TYPE_NONE, 0, 0, NULL);
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_DATABASE_ENTRY:
|
case DISPLAYLIST_DATABASE_ENTRY:
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
@ -12117,8 +12112,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL);
|
FILE_TYPE_NONE, 0, 0, NULL);
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_SORT
|
info->flags |= MD_FLAG_NEED_SORT
|
||||||
| MD_FLAG_NEED_REFRESH
|
| MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_OPTIONS_SHADERS:
|
case DISPLAYLIST_OPTIONS_SHADERS:
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
@ -12230,7 +12225,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
{
|
{
|
||||||
size_t _len2;
|
size_t _len2;
|
||||||
char buf[128];
|
char buf[128];
|
||||||
snprintf(buf_tmp + _len, sizeof(buf_tmp) - _len," #%u", i);
|
snprintf(buf_tmp + _len, sizeof(buf_tmp) - _len, " #%u", i);
|
||||||
|
|
||||||
if (menu_entries_append(info->list, buf_tmp, shdr_pass,
|
if (menu_entries_append(info->list, buf_tmp, shdr_pass,
|
||||||
MENU_ENUM_LABEL_VIDEO_SHADER_PASS,
|
MENU_ENUM_LABEL_VIDEO_SHADER_PASS,
|
||||||
@ -12283,8 +12278,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL);
|
FILE_TYPE_NONE, 0, 0, NULL);
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH
|
| MD_FLAG_NEED_PUSH
|
||||||
| MD_FLAG_NEED_CLEAR;
|
| MD_FLAG_NEED_CLEAR;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_CORE_CONTENT_DIRS_SUBDIR:
|
case DISPLAYLIST_CORE_CONTENT_DIRS_SUBDIR:
|
||||||
@ -12314,8 +12309,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL);
|
FILE_TYPE_NONE, 0, 0, NULL);
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH
|
| MD_FLAG_NEED_PUSH
|
||||||
| MD_FLAG_NEED_CLEAR;
|
| MD_FLAG_NEED_CLEAR;
|
||||||
|
|
||||||
string_list_deinitialize(&str_list);
|
string_list_deinitialize(&str_list);
|
||||||
#endif
|
#endif
|
||||||
@ -12342,8 +12337,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL);
|
FILE_TYPE_NONE, 0, 0, NULL);
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH
|
| MD_FLAG_NEED_PUSH
|
||||||
| MD_FLAG_NEED_CLEAR;
|
| MD_FLAG_NEED_CLEAR;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -12362,8 +12357,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL);
|
FILE_TYPE_NONE, 0, 0, NULL);
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH
|
| MD_FLAG_NEED_PUSH
|
||||||
| MD_FLAG_NEED_CLEAR;
|
| MD_FLAG_NEED_CLEAR;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_CORES_UPDATER:
|
case DISPLAYLIST_CORES_UPDATER:
|
||||||
@ -12447,7 +12442,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL);
|
FILE_TYPE_NONE, 0, 0, NULL);
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_THUMBNAILS_UPDATER:
|
case DISPLAYLIST_THUMBNAILS_UPDATER:
|
||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
@ -12464,8 +12459,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL);
|
FILE_TYPE_NONE, 0, 0, NULL);
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH
|
| MD_FLAG_NEED_PUSH
|
||||||
| MD_FLAG_NEED_CLEAR;
|
| MD_FLAG_NEED_CLEAR;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_PL_THUMBNAILS_UPDATER:
|
case DISPLAYLIST_PL_THUMBNAILS_UPDATER:
|
||||||
@ -12482,8 +12477,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL);
|
FILE_TYPE_NONE, 0, 0, NULL);
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH
|
| MD_FLAG_NEED_PUSH
|
||||||
| MD_FLAG_NEED_CLEAR;
|
| MD_FLAG_NEED_CLEAR;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_LAKKA:
|
case DISPLAYLIST_LAKKA:
|
||||||
@ -12501,8 +12496,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL);
|
FILE_TYPE_NONE, 0, 0, NULL);
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH
|
| MD_FLAG_NEED_PUSH
|
||||||
| MD_FLAG_NEED_CLEAR;
|
| MD_FLAG_NEED_CLEAR;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_PLAYLIST_COLLECTION:
|
case DISPLAYLIST_PLAYLIST_COLLECTION:
|
||||||
@ -12534,14 +12529,11 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
char path_playlist[PATH_MAX_LENGTH];
|
char path_playlist[PATH_MAX_LENGTH];
|
||||||
playlist_t *playlist = NULL;
|
playlist_t *playlist = NULL;
|
||||||
const char *dir_playlist = settings->paths.directory_playlist;
|
const char *dir_playlist = settings->paths.directory_playlist;
|
||||||
fill_pathname_join_special(
|
fill_pathname_join_special(path_playlist, dir_playlist, info->path,
|
||||||
path_playlist,
|
|
||||||
dir_playlist,
|
|
||||||
info->path,
|
|
||||||
sizeof(path_playlist));
|
sizeof(path_playlist));
|
||||||
|
|
||||||
menu_displaylist_set_new_playlist(menu,
|
menu_displaylist_set_new_playlist(menu, settings, path_playlist,
|
||||||
settings, path_playlist, true);
|
true);
|
||||||
|
|
||||||
strlcpy(path_playlist,
|
strlcpy(path_playlist,
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_COLLECTION),
|
msg_hash_to_str(MENU_ENUM_LABEL_COLLECTION),
|
||||||
@ -12563,8 +12555,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
* > Display lists generated from playlists
|
* > Display lists generated from playlists
|
||||||
* must never be sorted */
|
* must never be sorted */
|
||||||
info->flags &= ~MD_FLAG_NEED_SORT;
|
info->flags &= ~MD_FLAG_NEED_SORT;
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -12576,9 +12568,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
if (history_list_enable)
|
if (history_list_enable)
|
||||||
count = menu_displaylist_parse_playlist_generic(
|
count = menu_displaylist_parse_playlist_generic(
|
||||||
menu, info,
|
menu, info, settings, "history",
|
||||||
settings,
|
|
||||||
"history",
|
|
||||||
path_content_history,
|
path_content_history,
|
||||||
false, /* Not a collection */
|
false, /* Not a collection */
|
||||||
false, /* Do not sort */
|
false, /* Do not sort */
|
||||||
@ -12598,10 +12588,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
* > Display lists generated from playlists
|
* > Display lists generated from playlists
|
||||||
* must never be sorted */
|
* must never be sorted */
|
||||||
info->flags &= ~MD_FLAG_NEED_SORT;
|
info->flags &= ~MD_FLAG_NEED_SORT;
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
if (history_needs_navigation_clear(menu, g_defaults.content_history))
|
if (history_needs_navigation_clear(menu, g_defaults.content_history))
|
||||||
info->flags |= MD_FLAG_NEED_NAVIGATION_CLEAR;
|
info->flags |= MD_FLAG_NEED_NAVIGATION_CLEAR;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_FAVORITES:
|
case DISPLAYLIST_FAVORITES:
|
||||||
{
|
{
|
||||||
@ -12609,9 +12599,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
|
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
count = menu_displaylist_parse_playlist_generic(menu, info,
|
count = menu_displaylist_parse_playlist_generic(menu, info,
|
||||||
settings,
|
settings, "favorites", path_content_favorites,
|
||||||
"favorites",
|
|
||||||
path_content_favorites,
|
|
||||||
false, /* Not a conventional collection */
|
false, /* Not a conventional collection */
|
||||||
true, /* Enable sorting (if allowed by user config) */
|
true, /* Enable sorting (if allowed by user config) */
|
||||||
&ret);
|
&ret);
|
||||||
@ -12632,8 +12620,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
* > Display lists generated from playlists
|
* > Display lists generated from playlists
|
||||||
* must never be sorted */
|
* must never be sorted */
|
||||||
info->flags &= ~MD_FLAG_NEED_SORT;
|
info->flags &= ~MD_FLAG_NEED_SORT;
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_MUSIC_HISTORY:
|
case DISPLAYLIST_MUSIC_HISTORY:
|
||||||
@ -12671,10 +12659,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
* > Display lists generated from playlists
|
* > Display lists generated from playlists
|
||||||
* must never be sorted */
|
* must never be sorted */
|
||||||
info->flags &= ~MD_FLAG_NEED_SORT;
|
info->flags &= ~MD_FLAG_NEED_SORT;
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
if (history_needs_navigation_clear(menu, g_defaults.music_history))
|
if (history_needs_navigation_clear(menu, g_defaults.music_history))
|
||||||
info->flags |= MD_FLAG_NEED_NAVIGATION_CLEAR;
|
info->flags |= MD_FLAG_NEED_NAVIGATION_CLEAR;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_VIDEO_HISTORY:
|
case DISPLAYLIST_VIDEO_HISTORY:
|
||||||
@ -12748,8 +12736,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
MENU_ENUM_LABEL_DETECT_CORE_LIST_OK_CURRENT_CORE);
|
MENU_ENUM_LABEL_DETECT_CORE_LIST_OK_CURRENT_CORE);
|
||||||
|
|
||||||
info->flags &= ~MD_FLAG_NEED_SORT;
|
info->flags &= ~MD_FLAG_NEED_SORT;
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_CORES_COLLECTION_SUPPORTED:
|
case DISPLAYLIST_CORES_COLLECTION_SUPPORTED:
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
@ -12760,8 +12748,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION_CURRENT_CORE);
|
MENU_ENUM_LABEL_FILE_BROWSER_CORE_SELECT_FROM_COLLECTION_CURRENT_CORE);
|
||||||
|
|
||||||
info->flags &= ~MD_FLAG_NEED_SORT;
|
info->flags &= ~MD_FLAG_NEED_SORT;
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
core_selected = true;
|
core_selected = true;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_CORE_INFO:
|
case DISPLAYLIST_CORE_INFO:
|
||||||
@ -12787,7 +12775,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
|
|
||||||
if (selection >= count)
|
if (selection >= count)
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_NAVIGATION_CLEAR;
|
| MD_FLAG_NEED_NAVIGATION_CLEAR;
|
||||||
info->flags |= MD_FLAG_NEED_PUSH;
|
info->flags |= MD_FLAG_NEED_PUSH;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -12796,15 +12784,15 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
count = menu_displaylist_parse_core_backup_list(
|
count = menu_displaylist_parse_core_backup_list(
|
||||||
info->list, info->path, settings, true);
|
info->list, info->path, settings, true);
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_CORE_DELETE_BACKUP_LIST:
|
case DISPLAYLIST_CORE_DELETE_BACKUP_LIST:
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
count = menu_displaylist_parse_core_backup_list(
|
count = menu_displaylist_parse_core_backup_list(
|
||||||
info->list, info->path, settings, false);
|
info->list, info->path, settings, false);
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH
|
| MD_FLAG_NEED_PUSH
|
||||||
| MD_FLAG_NEED_NAVIGATION_CLEAR;
|
| MD_FLAG_NEED_NAVIGATION_CLEAR;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_CORE_MANAGER_LIST:
|
case DISPLAYLIST_CORE_MANAGER_LIST:
|
||||||
{
|
{
|
||||||
@ -12843,7 +12831,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
count = menu_displaylist_parse_core_manager_steam_list(info->list, settings);
|
count = menu_displaylist_parse_core_manager_steam_list(info->list, settings);
|
||||||
info->flags &= ~MD_FLAG_NEED_REFRESH;
|
info->flags &= ~MD_FLAG_NEED_REFRESH;
|
||||||
info->flags |= MD_FLAG_NEED_PUSH
|
info->flags |= MD_FLAG_NEED_PUSH
|
||||||
| MD_FLAG_NEED_NAVIGATION_CLEAR;
|
| MD_FLAG_NEED_NAVIGATION_CLEAR;
|
||||||
|
|
||||||
/* No core dlcs were found */
|
/* No core dlcs were found */
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
@ -12860,7 +12848,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
|
|
||||||
info->flags &= ~MD_FLAG_NEED_REFRESH;
|
info->flags &= ~MD_FLAG_NEED_REFRESH;
|
||||||
info->flags |= MD_FLAG_NEED_PUSH
|
info->flags |= MD_FLAG_NEED_PUSH
|
||||||
| MD_FLAG_NEED_NAVIGATION_CLEAR;
|
| MD_FLAG_NEED_NAVIGATION_CLEAR;
|
||||||
count =
|
count =
|
||||||
menu_displaylist_parse_core_information_steam(info->list, info->path, settings);
|
menu_displaylist_parse_core_information_steam(info->list, info->path, settings);
|
||||||
|
|
||||||
@ -13100,7 +13088,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
|
|
||||||
if (selection >= count)
|
if (selection >= count)
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_NAVIGATION_CLEAR;
|
| MD_FLAG_NEED_NAVIGATION_CLEAR;
|
||||||
info->flags |= MD_FLAG_NEED_PUSH;
|
info->flags |= MD_FLAG_NEED_PUSH;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -13131,7 +13119,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
|
|
||||||
if (selection >= count)
|
if (selection >= count)
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_NAVIGATION_CLEAR;
|
| MD_FLAG_NEED_NAVIGATION_CLEAR;
|
||||||
info->flags |= MD_FLAG_NEED_PUSH;
|
info->flags |= MD_FLAG_NEED_PUSH;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -13161,7 +13149,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
|
|
||||||
if (selection >= count)
|
if (selection >= count)
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_NAVIGATION_CLEAR;
|
| MD_FLAG_NEED_NAVIGATION_CLEAR;
|
||||||
info->flags |= MD_FLAG_NEED_PUSH;
|
info->flags |= MD_FLAG_NEED_PUSH;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -13219,7 +13207,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
MENU_SETTING_DROPDOWN_ITEM_VIDEO_SHADER_PARAM);
|
MENU_SETTING_DROPDOWN_ITEM_VIDEO_SHADER_PARAM);
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_DROPDOWN_LIST_VIDEO_SHADER_PRESET_PARAMETER:
|
case DISPLAYLIST_DROPDOWN_LIST_VIDEO_SHADER_PRESET_PARAMETER:
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
@ -13229,7 +13217,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
MENU_SETTINGS_SHADER_PRESET_PARAMETER_0,
|
MENU_SETTINGS_SHADER_PRESET_PARAMETER_0,
|
||||||
MENU_SETTING_DROPDOWN_ITEM_VIDEO_SHADER_PRESET_PARAM);
|
MENU_SETTING_DROPDOWN_ITEM_VIDEO_SHADER_PRESET_PARAM);
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_DROPDOWN_LIST_INPUT_DEVICE_TYPE:
|
case DISPLAYLIST_DROPDOWN_LIST_INPUT_DEVICE_TYPE:
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
@ -13243,7 +13231,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL))
|
FILE_TYPE_NONE, 0, 0, NULL))
|
||||||
count++;
|
count++;
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
case DISPLAYLIST_DROPDOWN_LIST_INPUT_SELECT_PHYSICAL_KEYBOARD:
|
case DISPLAYLIST_DROPDOWN_LIST_INPUT_SELECT_PHYSICAL_KEYBOARD:
|
||||||
@ -13258,7 +13246,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL))
|
FILE_TYPE_NONE, 0, 0, NULL))
|
||||||
count++;
|
count++;
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case DISPLAYLIST_DROPDOWN_LIST_INPUT_DESCRIPTION:
|
case DISPLAYLIST_DROPDOWN_LIST_INPUT_DESCRIPTION:
|
||||||
@ -13273,7 +13261,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL))
|
FILE_TYPE_NONE, 0, 0, NULL))
|
||||||
count++;
|
count++;
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_DROPDOWN_LIST_INPUT_DESCRIPTION_KBD:
|
case DISPLAYLIST_DROPDOWN_LIST_INPUT_DESCRIPTION_KBD:
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
@ -13287,7 +13275,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL))
|
FILE_TYPE_NONE, 0, 0, NULL))
|
||||||
count++;
|
count++;
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_DROPDOWN_LIST_AUDIO_DEVICE:
|
case DISPLAYLIST_DROPDOWN_LIST_AUDIO_DEVICE:
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
@ -13301,7 +13289,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
FILE_TYPE_NONE, 0, 0, NULL))
|
FILE_TYPE_NONE, 0, 0, NULL))
|
||||||
count++;
|
count++;
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
case DISPLAYLIST_DROPDOWN_LIST_NETPLAY_MITM_SERVER:
|
case DISPLAYLIST_DROPDOWN_LIST_NETPLAY_MITM_SERVER:
|
||||||
@ -13317,7 +13305,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
count++;
|
count++;
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case DISPLAYLIST_SAVING_SETTINGS_LIST:
|
case DISPLAYLIST_SAVING_SETTINGS_LIST:
|
||||||
@ -13507,7 +13495,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
|
|
||||||
/* Special pass */
|
/* Special pass */
|
||||||
switch (type)
|
switch (type)
|
||||||
@ -13532,14 +13520,14 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
* must never be sorted */
|
* must never be sorted */
|
||||||
info->flags &= ~MD_FLAG_NEED_SORT;
|
info->flags &= ~MD_FLAG_NEED_SORT;
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS:
|
case DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS:
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
ret = menu_displaylist_parse_horizontal_content_actions
|
ret = menu_displaylist_parse_horizontal_content_actions
|
||||||
(menu, settings, info->list);
|
(menu, settings, info->list);
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
|
|
||||||
if (core_selected)
|
if (core_selected)
|
||||||
{
|
{
|
||||||
@ -13800,7 +13788,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_MAIN_MENU:
|
case DISPLAYLIST_MAIN_MENU:
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
@ -14037,7 +14025,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
ret = MENU_DISPLAYLIST_PARSE_SETTINGS(info->list,
|
ret = MENU_DISPLAYLIST_PARSE_SETTINGS(info->list,
|
||||||
lbl, PARSE_NONE, true, MENU_SETTINGS_INPUT_BEGIN);
|
lbl, PARSE_NONE, true, MENU_SETTINGS_INPUT_BEGIN);
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_DATABASES:
|
case DISPLAYLIST_DATABASES:
|
||||||
@ -14185,7 +14173,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
* must never be sorted */
|
* must never be sorted */
|
||||||
info->flags &= ~MD_FLAG_NEED_SORT;
|
info->flags &= ~MD_FLAG_NEED_SORT;
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_IMAGES_HISTORY:
|
case DISPLAYLIST_IMAGES_HISTORY:
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
@ -14221,7 +14209,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
* must never be sorted */
|
* must never be sorted */
|
||||||
info->flags &= ~MD_FLAG_NEED_SORT;
|
info->flags &= ~MD_FLAG_NEED_SORT;
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
#if defined(HAVE_IMAGEVIEWER)
|
#if defined(HAVE_IMAGEVIEWER)
|
||||||
if (history_needs_navigation_clear(menu, g_defaults.image_history))
|
if (history_needs_navigation_clear(menu, g_defaults.image_history))
|
||||||
info->flags |= MD_FLAG_NEED_NAVIGATION_CLEAR;
|
info->flags |= MD_FLAG_NEED_NAVIGATION_CLEAR;
|
||||||
@ -14346,7 +14334,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
MENU_SETTING_NO_ITEM, 0, 0, NULL);
|
MENU_SETTING_NO_ITEM, 0, 0, NULL);
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_CORES:
|
case DISPLAYLIST_CORES:
|
||||||
@ -14379,7 +14367,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
msg_hash_to_str(MENU_ENUM_LABEL_CORE_LIST)))
|
msg_hash_to_str(MENU_ENUM_LABEL_CORE_LIST)))
|
||||||
info->flags |= MD_FLAG_PUSH_BUILTIN_CORES;
|
info->flags |= MD_FLAG_PUSH_BUILTIN_CORES;
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_DEFAULT:
|
case DISPLAYLIST_DEFAULT:
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||||
@ -14716,7 +14704,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_DROPDOWN_LIST_VIDEO_SHADER_NUM_PASSES:
|
case DISPLAYLIST_DROPDOWN_LIST_VIDEO_SHADER_NUM_PASSES:
|
||||||
@ -14750,7 +14738,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
@ -15047,7 +15035,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_NONE:
|
case DISPLAYLIST_NONE:
|
||||||
break;
|
break;
|
||||||
@ -15096,7 +15084,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
info->flags |= MD_FLAG_NEED_REFRESH
|
info->flags |= MD_FLAG_NEED_REFRESH
|
||||||
| MD_FLAG_NEED_PUSH;
|
| MD_FLAG_NEED_PUSH;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
|
@ -625,16 +625,6 @@ static int setting_bind_action_start(rarch_setting_t *setting)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static void setting_get_string_representation_hex(rarch_setting_t *setting,
|
|
||||||
char *s, size_t len)
|
|
||||||
{
|
|
||||||
if (setting)
|
|
||||||
snprintf(s, len, "%08x",
|
|
||||||
*setting->value.target.unsigned_integer);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void setting_get_string_representation_hex_and_uint(
|
void setting_get_string_representation_hex_and_uint(
|
||||||
rarch_setting_t *setting, char *s, size_t len)
|
rarch_setting_t *setting, char *s, size_t len)
|
||||||
{
|
{
|
||||||
@ -6198,12 +6188,9 @@ static void setting_get_string_representation_video_frame_delay(rarch_setting_t
|
|||||||
|
|
||||||
if (*setting->value.target.unsigned_integer == 0)
|
if (*setting->value.target.unsigned_integer == 0)
|
||||||
{
|
{
|
||||||
if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST)))
|
size_t _len = strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY_AUTOMATIC), len);
|
||||||
snprintf(s, len, "%s",
|
if (!string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST)))
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY_AUTOMATIC));
|
snprintf(s + _len, len - _len, " (%u %s)",
|
||||||
else
|
|
||||||
snprintf(s, len, "%s (%u %s)",
|
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY_AUTOMATIC),
|
|
||||||
video_st->frame_delay_effective,
|
video_st->frame_delay_effective,
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY_EFFECTIVE));
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY_EFFECTIVE));
|
||||||
}
|
}
|
||||||
@ -6694,8 +6681,6 @@ static void setting_get_string_representation_uint_user_language(
|
|||||||
{
|
{
|
||||||
const char *modes[RETRO_LANGUAGE_LAST];
|
const char *modes[RETRO_LANGUAGE_LAST];
|
||||||
uint32_t translated[RETRO_LANGUAGE_LAST];
|
uint32_t translated[RETRO_LANGUAGE_LAST];
|
||||||
const char *rating;
|
|
||||||
|
|
||||||
#define LANG_DATA(STR) \
|
#define LANG_DATA(STR) \
|
||||||
modes[RETRO_LANGUAGE_##STR] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_##STR); \
|
modes[RETRO_LANGUAGE_##STR] = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LANG_##STR); \
|
||||||
translated[RETRO_LANGUAGE_##STR] = LANGUAGE_PROGRESS_##STR##_TRANSLATED; \
|
translated[RETRO_LANGUAGE_##STR] = LANGUAGE_PROGRESS_##STR##_TRANSLATED; \
|
||||||
@ -6745,18 +6730,17 @@ static void setting_get_string_representation_uint_user_language(
|
|||||||
LANG_DATA(HUNGARIAN)
|
LANG_DATA(HUNGARIAN)
|
||||||
|
|
||||||
if (*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE) == RETRO_LANGUAGE_ENGLISH)
|
if (*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE) == RETRO_LANGUAGE_ENGLISH)
|
||||||
|
snprintf(s, len, "%s", modes[*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE)]);
|
||||||
|
else
|
||||||
{
|
{
|
||||||
snprintf(s, len, "%s",
|
const char *rating = msg_hash_to_str(
|
||||||
modes[*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE)]);
|
translated[*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE)] > 95 ? MENU_ENUM_LABEL_VALUE_LNG_COMPLETION_95_PLUS :
|
||||||
} else {
|
translated[*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE)] > 74 ? MENU_ENUM_LABEL_VALUE_LNG_COMPLETION_75_PLUS :
|
||||||
rating = msg_hash_to_str(
|
translated[*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE)] > 49 ? MENU_ENUM_LABEL_VALUE_LNG_COMPLETION_50_PLUS :
|
||||||
translated[*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE)] > 95 ? MENU_ENUM_LABEL_VALUE_LNG_COMPLETION_95_PLUS :
|
translated[*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE)] > 24 ? MENU_ENUM_LABEL_VALUE_LNG_COMPLETION_25_PLUS :
|
||||||
translated[*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE)] > 74 ? MENU_ENUM_LABEL_VALUE_LNG_COMPLETION_75_PLUS :
|
MENU_ENUM_LABEL_VALUE_LNG_COMPLETION_25_MINUS);
|
||||||
translated[*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE)] > 49 ? MENU_ENUM_LABEL_VALUE_LNG_COMPLETION_50_PLUS :
|
|
||||||
translated[*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE)] > 24 ? MENU_ENUM_LABEL_VALUE_LNG_COMPLETION_25_PLUS :
|
|
||||||
MENU_ENUM_LABEL_VALUE_LNG_COMPLETION_25_MINUS);
|
|
||||||
snprintf(s, len, "%s [%s]",
|
snprintf(s, len, "%s [%s]",
|
||||||
modes[*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE)], rating);
|
modes[*msg_hash_get_uint(MSG_HASH_USER_LANGUAGE)], rating);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -7598,15 +7582,11 @@ static void get_string_representation_input_device_index(
|
|||||||
if (!string_is_empty(device_name))
|
if (!string_is_empty(device_name))
|
||||||
{
|
{
|
||||||
unsigned idx = input_config_get_device_name_index(map);
|
unsigned idx = input_config_get_device_name_index(map);
|
||||||
|
size_t _len = strlcpy(s, device_name, len);
|
||||||
|
|
||||||
/* If idx is non-zero, it's part of a set */
|
/* If idx is non-zero, it's part of a set */
|
||||||
if (idx > 0)
|
if (idx > 0)
|
||||||
snprintf(s, len,
|
snprintf(s + _len, len - _len, " (%u)", idx);
|
||||||
"%s (%u)",
|
|
||||||
device_name,
|
|
||||||
idx);
|
|
||||||
else
|
|
||||||
strlcpy(s, device_name, len);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
snprintf(s, len,
|
snprintf(s, len,
|
||||||
|
38
retroarch.c
38
retroarch.c
@ -2252,39 +2252,29 @@ bool command_event(enum event_command cmd, void *data)
|
|||||||
settings->bools.run_ahead_enabled =
|
settings->bools.run_ahead_enabled =
|
||||||
!(settings->bools.run_ahead_enabled);
|
!(settings->bools.run_ahead_enabled);
|
||||||
|
|
||||||
if (!settings->bools.run_ahead_enabled)
|
if (settings->bools.run_ahead_enabled)
|
||||||
{
|
|
||||||
runloop_msg_queue_push(msg_hash_to_str(MSG_RUNAHEAD_DISABLED),
|
|
||||||
1, 100, false,
|
|
||||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
char msg[256];
|
char msg[256];
|
||||||
|
if (settings->bools.run_ahead_secondary_instance)
|
||||||
if (!settings->bools.run_ahead_secondary_instance)
|
snprintf(msg, sizeof(msg),
|
||||||
{
|
msg_hash_to_str(MSG_RUNAHEAD_ENABLED_WITH_SECOND_INSTANCE),
|
||||||
snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_RUNAHEAD_ENABLED),
|
|
||||||
settings->uints.run_ahead_frames);
|
settings->uints.run_ahead_frames);
|
||||||
|
|
||||||
runloop_msg_queue_push(
|
|
||||||
msg, 1, 100, false,
|
|
||||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
snprintf(msg, sizeof(msg),
|
||||||
snprintf(msg, sizeof(msg), msg_hash_to_str(MSG_RUNAHEAD_ENABLED_WITH_SECOND_INSTANCE),
|
msg_hash_to_str(MSG_RUNAHEAD_ENABLED),
|
||||||
settings->uints.run_ahead_frames);
|
settings->uints.run_ahead_frames);
|
||||||
|
runloop_msg_queue_push(msg, 1, 100, false,
|
||||||
runloop_msg_queue_push(
|
NULL, MESSAGE_QUEUE_ICON_DEFAULT,
|
||||||
msg, 1, 100, false,
|
MESSAGE_QUEUE_CATEGORY_INFO);
|
||||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Disable preemptive frames */
|
/* Disable preemptive frames */
|
||||||
settings->bools.preemptive_frames_enable = false;
|
settings->bools.preemptive_frames_enable = false;
|
||||||
preempt_deinit(runloop_st);
|
preempt_deinit(runloop_st);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
runloop_msg_queue_push(msg_hash_to_str(MSG_RUNAHEAD_DISABLED),
|
||||||
|
1, 100, false,
|
||||||
|
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
@ -2303,11 +2293,9 @@ bool command_event(enum event_command cmd, void *data)
|
|||||||
settings->bools.preemptive_frames_hide_warnings = old_warn;
|
settings->bools.preemptive_frames_hide_warnings = old_warn;
|
||||||
|
|
||||||
if (old_inited && !runloop_st->preempt_data)
|
if (old_inited && !runloop_st->preempt_data)
|
||||||
{
|
|
||||||
runloop_msg_queue_push(msg_hash_to_str(MSG_PREEMPT_DISABLED),
|
runloop_msg_queue_push(msg_hash_to_str(MSG_PREEMPT_DISABLED),
|
||||||
1, 100, false,
|
1, 100, false,
|
||||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||||
}
|
|
||||||
else if (runloop_st->preempt_data)
|
else if (runloop_st->preempt_data)
|
||||||
{
|
{
|
||||||
char msg[256];
|
char msg[256];
|
||||||
|
@ -781,6 +781,7 @@ static bool content_file_extract_from_archive(
|
|||||||
tmp_path[0] = '\0';
|
tmp_path[0] = '\0';
|
||||||
msg[0] = '\0';
|
msg[0] = '\0';
|
||||||
|
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
RARCH_LOG("[Content]: Core requires uncompressed content - "
|
RARCH_LOG("[Content]: Core requires uncompressed content - "
|
||||||
"extracting archive to temporary directory.\n");
|
"extracting archive to temporary directory.\n");
|
||||||
|
|
||||||
@ -808,6 +809,7 @@ static bool content_file_extract_from_archive(
|
|||||||
/* Update content path pointer */
|
/* Update content path pointer */
|
||||||
*content_path = tmp_path_ptr;
|
*content_path = tmp_path_ptr;
|
||||||
|
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
RARCH_LOG("[Content]: Content successfully extracted to: \"%s\".\n",
|
RARCH_LOG("[Content]: Content successfully extracted to: \"%s\".\n",
|
||||||
tmp_path);
|
tmp_path);
|
||||||
|
|
||||||
@ -1071,7 +1073,7 @@ static bool content_file_load(
|
|||||||
* (This disclaimer is out dated but I don't want to remove it)*/
|
* (This disclaimer is out dated but I don't want to remove it)*/
|
||||||
if (!CopyFileFromAppW(wcontent_path, wnew_path, false))
|
if (!CopyFileFromAppW(wcontent_path, wnew_path, false))
|
||||||
{
|
{
|
||||||
int err = GetLastError();
|
/* TODO/FIXME - localize */
|
||||||
snprintf(msg, sizeof(msg), "%s \"%s\". (during copy read or write)\n",
|
snprintf(msg, sizeof(msg), "%s \"%s\". (during copy read or write)\n",
|
||||||
msg_hash_to_str(MSG_COULD_NOT_READ_CONTENT_FILE),
|
msg_hash_to_str(MSG_COULD_NOT_READ_CONTENT_FILE),
|
||||||
content_path);
|
content_path);
|
||||||
@ -1175,6 +1177,7 @@ static const struct retro_subsystem_info *content_file_init_subsystem(
|
|||||||
|
|
||||||
if (!special)
|
if (!special)
|
||||||
{
|
{
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
snprintf(msg, sizeof(msg),
|
snprintf(msg, sizeof(msg),
|
||||||
"Failed to find subsystem \"%s\" in libretro implementation.\n",
|
"Failed to find subsystem \"%s\" in libretro implementation.\n",
|
||||||
path_get(RARCH_PATH_SUBSYSTEM));
|
path_get(RARCH_PATH_SUBSYSTEM));
|
||||||
@ -1192,6 +1195,7 @@ static const struct retro_subsystem_info *content_file_init_subsystem(
|
|||||||
|
|
||||||
if (special->num_roms != subsystem->size)
|
if (special->num_roms != subsystem->size)
|
||||||
{
|
{
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
snprintf(msg, sizeof(msg),
|
snprintf(msg, sizeof(msg),
|
||||||
"Libretro core requires %u content files for "
|
"Libretro core requires %u content files for "
|
||||||
"subsystem \"%s\", but %u content files were provided.\n",
|
"subsystem \"%s\", but %u content files were provided.\n",
|
||||||
@ -1203,6 +1207,7 @@ static const struct retro_subsystem_info *content_file_init_subsystem(
|
|||||||
}
|
}
|
||||||
else if (subsystem && subsystem->size)
|
else if (subsystem && subsystem->size)
|
||||||
{
|
{
|
||||||
|
/* TODO/FIXME - localize */
|
||||||
snprintf(msg, sizeof(msg),
|
snprintf(msg, sizeof(msg),
|
||||||
"Libretro core takes no content for subsystem \"%s\", "
|
"Libretro core takes no content for subsystem \"%s\", "
|
||||||
"but %u content files were provided.\n",
|
"but %u content files were provided.\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user