Use MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE

This commit is contained in:
twinaphex 2016-06-29 02:40:05 +02:00
parent 5d89bf970f
commit 2a9bf91e0d
9 changed files with 30 additions and 16 deletions

View File

@ -21,9 +21,12 @@
#include <utility> #include <utility>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include "slang_reflection.hpp"
#include "../video_shader_driver.h" #include "../video_shader_driver.h"
#include "../../verbosity.h" #include "../../verbosity.h"
#include "slang_reflection.hpp" #include "../../msg_hash.h"
using namespace std; using namespace std;
@ -804,7 +807,10 @@ bool vulkan_filter_chain::init()
for (unsigned i = 0; i < passes.size(); i++) for (unsigned i = 0; i < passes.size(); i++)
{ {
auto &pass = passes[i]; auto &pass = passes[i];
RARCH_LOG("[slang]: Building pass #%u (%s)\n", i, pass->get_name().empty() ? "N/A" : pass->get_name().c_str()); RARCH_LOG("[slang]: Building pass #%u (%s)\n", i,
pass->get_name().empty() ?
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE) :
pass->get_name().c_str());
source = pass->set_pass_info(max_input_size, source = pass->set_pass_info(max_input_size,
source, swapchain_info, pass_info[i]); source, swapchain_info, pass_info[i]);

View File

@ -1029,7 +1029,7 @@ bool video_monitor_get_fps(char *buf, size_t size,
curr_time = fps_time = new_time; curr_time = fps_time = new_time;
strlcpy(buf, video_driver_title_buf, size); strlcpy(buf, video_driver_title_buf, size);
if (buf_fps) if (buf_fps)
strlcpy(buf_fps, "N/A", size_fps); strlcpy(buf_fps, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), size_fps);
return true; return true;
} }

View File

@ -25,6 +25,7 @@
#include "input_keymaps.h" #include "input_keymaps.h"
#include "input_remapping.h" #include "input_remapping.h"
#include "../msg_hash.h"
#include "../file_path_special.h" #include "../file_path_special.h"
#include "../general.h" #include "../general.h"
#include "../verbosity.h" #include "../verbosity.h"
@ -390,8 +391,9 @@ static void input_config_get_bind_string_joykey(char *buf, const char *prefix,
&& settings->input.input_descriptor_label_show) && settings->input.input_descriptor_label_show)
snprintf(buf, size, "%s %s ", prefix, bind->joykey_label); snprintf(buf, size, "%s %s ", prefix, bind->joykey_label);
else else
snprintf(buf, size, "%sHat #%u %s (N/A)", prefix, snprintf(buf, size, "%sHat #%u %s (%s)", prefix,
(unsigned)GET_HAT(bind->joykey), dir); (unsigned)GET_HAT(bind->joykey), dir,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE));
} }
else else
{ {
@ -399,7 +401,8 @@ static void input_config_get_bind_string_joykey(char *buf, const char *prefix,
&& settings->input.input_descriptor_label_show) && settings->input.input_descriptor_label_show)
snprintf(buf, size, "%s%s (btn) ", prefix, bind->joykey_label); snprintf(buf, size, "%s%s (btn) ", prefix, bind->joykey_label);
else else
snprintf(buf, size, "%s%u (N/A) ", prefix, (unsigned)bind->joykey); snprintf(buf, size, "%s%u (%s) ", prefix, (unsigned)bind->joykey,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE));
} }
} }
@ -424,7 +427,8 @@ static void input_config_get_bind_string_joyaxis(char *buf, const char *prefix,
&& settings->input.input_descriptor_label_show) && settings->input.input_descriptor_label_show)
snprintf(buf, size, "%s%s (axis) ", prefix, bind->joyaxis_label); snprintf(buf, size, "%s%s (axis) ", prefix, bind->joyaxis_label);
else else
snprintf(buf, size, "%s%c%u (N/A) ", prefix, dir, axis); snprintf(buf, size, "%s%c%u (%s) ", prefix, dir, axis,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE));
} }
void input_config_get_bind_string(char *buf, const struct retro_keybind *bind, void input_config_get_bind_string(char *buf, const struct retro_keybind *bind,

View File

@ -1214,8 +1214,6 @@ const char *msg_hash_to_str_pt(enum msg_hash_enums msg)
return "<Padrão>"; return "<Padrão>";
case MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE: case MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE:
return "<Nenhum>"; return "<Nenhum>";
case MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE:
return "N/A";
case MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY: case MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY:
return "Remapeamentos de Controladores"; return "Remapeamentos de Controladores";
case MENU_ENUM_LABEL_VALUE_JOYPAD_AUTOCONFIG_DIR: case MENU_ENUM_LABEL_VALUE_JOYPAD_AUTOCONFIG_DIR:

View File

@ -440,7 +440,8 @@ static void menu_action_setting_disp_set_label_input_desc(
if (inp_desc_button_index_offset < RARCH_FIRST_CUSTOM_BIND) if (inp_desc_button_index_offset < RARCH_FIRST_CUSTOM_BIND)
{ {
if(strstr(descriptor,"Auto") && !strstr(descriptor,"(N/A)")) if(strstr(descriptor,"Auto") && !strstr(descriptor,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE)))
strlcpy(s, strlcpy(s,
descriptor, descriptor,
len); len);
@ -1222,7 +1223,7 @@ static void menu_action_setting_disp_set_label_playlist_associations(file_list_t
string_list_free(str_list2); string_list_free(str_list2);
if (string_is_equal(s, "DETECT") || !found_matching_core_association) if (string_is_equal(s, "DETECT") || !found_matching_core_association)
strlcpy(s, "N/A", len); strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), len);
else else
{ {
char buf[PATH_MAX_LENGTH]; char buf[PATH_MAX_LENGTH];

View File

@ -554,7 +554,7 @@ static int action_get_title_generic(char *s, size_t len, const char *path,
(string_is_empty(elem0_path)) ? "" : path_basename(elem0_path)); (string_is_empty(elem0_path)) ? "" : path_basename(elem0_path));
} }
else else
strlcpy(s, "N/A", len); strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), len);
return 0; return 0;
} }

View File

@ -716,7 +716,7 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info)
break; break;
case FRONTEND_ARCH_NONE: case FRONTEND_ARCH_NONE:
default: default:
strlcpy(cpu_arch_str, "N/A", sizeof(cpu_arch_str)); strlcpy(cpu_arch_str, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE), sizeof(cpu_arch_str));
break; break;
} }

View File

@ -1104,7 +1104,8 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
RARCH_LOG("Environ GET_VARIABLE %s:\n", var->key); RARCH_LOG("Environ GET_VARIABLE %s:\n", var->key);
core_option_manager_get(runloop_core_options, var); core_option_manager_get(runloop_core_options, var);
RARCH_LOG("\t%s\n", var->value ? var->value : "N/A"); RARCH_LOG("\t%s\n", var->value ? var->value :
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE));
} }
break; break;
case RUNLOOP_CTL_CORE_OPTIONS_INIT: case RUNLOOP_CTL_CORE_OPTIONS_INIT:

View File

@ -126,7 +126,9 @@ static void RunActionSheet(const char* title, const struct string_list* items,
result.textLabel.text = BOXSTRING(label); result.textLabel.text = BOXSTRING(label);
if (string_is_empty(label)) if (string_is_empty(label))
strlcpy(buffer, "N/A", sizeof(buffer)); strlcpy(buffer,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE),
sizeof(buffer));
result.detailTextLabel.text = BOXSTRING(buffer); result.detailTextLabel.text = BOXSTRING(buffer);
return result; return result;
} }
@ -429,7 +431,9 @@ replacementString:(NSString *)string
menu_entry_get_value(self.i, buffer, sizeof(buffer)); menu_entry_get_value(self.i, buffer, sizeof(buffer));
if (string_is_empty(buffer)) if (string_is_empty(buffer))
strlcpy(buffer, "N/A", sizeof(buffer)); strlcpy(buffer,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE),
sizeof(buffer));
field.placeholder = BOXSTRING(buffer); field.placeholder = BOXSTRING(buffer);