mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 00:39:53 +00:00
Get rid of a few unnecessary strcpys
This commit is contained in:
parent
41c7d0315f
commit
39ad8ff865
@ -58,10 +58,7 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
case MENU_LABEL_INPUT_DRIVER_UDEV:
|
||||
{
|
||||
/* Work around C89 limitations */
|
||||
char u[501];
|
||||
char t[501];
|
||||
|
||||
snprintf(t, sizeof(t),
|
||||
const char * t =
|
||||
"udev-Eingabetreiber. \n"
|
||||
" \n"
|
||||
"Dieser Treiber kann ohne X ausgeführt werden. \n"
|
||||
@ -70,9 +67,8 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"für die Joystick-Unterstützung und unterstützt \n"
|
||||
"auch Hotplugging und Force-Feedback (wenn das \n"
|
||||
"Gerät dies unterstützt). \n"
|
||||
" \n"
|
||||
);
|
||||
snprintf(u, sizeof(u),
|
||||
" \n";
|
||||
const char * u =
|
||||
"Der Treiber liest evdev-Ereignisse für die Tastatur- \n"
|
||||
"Unterstützung und kann auch mit Tastatur-Callbacks, \n"
|
||||
"Mäusen und Touchpads umgehen. \n"
|
||||
@ -81,7 +77,7 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"meisten Linux-Distribution nur vom Root- \n"
|
||||
"Benutzer lesbar (mode 600). Du kannst eine udev- \n"
|
||||
"Regel erstellen, die auch den Zugriff für andere \n"
|
||||
"Benutzer erlaubt.");
|
||||
"Benutzer erlaubt.";
|
||||
strlcpy(s, t, len);
|
||||
strlcat(s, u, len);
|
||||
}
|
||||
|
@ -68,9 +68,8 @@ int menu_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
{
|
||||
/* Work around C89 limitations */
|
||||
char u[501];
|
||||
char t[501];
|
||||
|
||||
strlcpy(t,
|
||||
const char * t =
|
||||
"RetroArch utiliza un formato único para \n"
|
||||
"sincronizar vídeo y sonido que necesita \n"
|
||||
"calibrarse con la frecuencia de \n"
|
||||
@ -80,8 +79,8 @@ int menu_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Si notas cortes de sonido o en la imagen,\n"
|
||||
"lo normal es que necesites calibrar estos\n"
|
||||
"ajustes. Aquí van algunas opciones:\n"
|
||||
" \n", sizeof(t));
|
||||
snprintf(u, sizeof(u),
|
||||
" \n";
|
||||
snprintf(u, sizeof(u), /* can't inline this due to the printf arguments */
|
||||
"a) Ve a '%s' -> '%s' y activa\n"
|
||||
"'Vídeo por hilos'. En este modo la tasa\n"
|
||||
"de refresco es irrelevante, habrá más fps,\n"
|
||||
|
@ -128,10 +128,7 @@ int menu_hash_get_help_it_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
case MENU_LABEL_INPUT_DRIVER_UDEV:
|
||||
{
|
||||
/* Work around C89 limitations */
|
||||
char u[501];
|
||||
char t[501];
|
||||
|
||||
strlcpy(t,
|
||||
const char * t =
|
||||
"udev Input driver. \n"
|
||||
" \n"
|
||||
"Questo driver può caricare senza X. \n"
|
||||
@ -140,15 +137,15 @@ int menu_hash_get_help_it_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"per il supporto del joystick. Supporta \n"
|
||||
"hotplugging e force feedback (se \n"
|
||||
"supportato dal dispositivo). \n"
|
||||
" \n", sizeof(t));
|
||||
strlcpy(u,
|
||||
" \n";
|
||||
const char * u =
|
||||
"Il driver legge gli eventi evdev per il supporto \n"
|
||||
"della tastiera. Supporta anche la callback della tastiera, \n"
|
||||
"mouse e touchpads. \n"
|
||||
" \n"
|
||||
"Come predefinito nella maggior parte delle distribuzioni, i nodi /dev/input \n"
|
||||
"sono only-root (modalità 600). Puoi settare una regola udev \n"
|
||||
"che fa queste accessibili ai non-root.", sizeof(u));
|
||||
"che fa queste accessibili ai non-root.";
|
||||
strlcpy(s, t, len);
|
||||
strlcat(s, u, len);
|
||||
}
|
||||
|
@ -624,9 +624,7 @@ int menu_hash_get_help_jp_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
{
|
||||
/* Work around C89 limitations */
|
||||
char u[501];
|
||||
char t[501];
|
||||
|
||||
strlcpy(t,
|
||||
const char * t =
|
||||
"RetroArch relies on an unique form of\n"
|
||||
"audio/video synchronization where it needs to be\n"
|
||||
"calibrated against the refresh rate of your\n"
|
||||
@ -635,8 +633,8 @@ int menu_hash_get_help_jp_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"If you experience any audio crackling or video\n"
|
||||
"tearing, usually it means that you need to\n"
|
||||
"calibrate the settings. Some choices below:\n"
|
||||
" \n", sizeof(t));
|
||||
snprintf(u, sizeof(u),
|
||||
" \n";
|
||||
snprintf(u, sizeof(u), /* can't inline this due to the printf arguments */
|
||||
"a) Go to '%s' -> '%s', and enable\n"
|
||||
"'Threaded Video'. Refresh rate will not matter\n"
|
||||
"in this mode, framerate will be higher,\n"
|
||||
|
@ -494,9 +494,7 @@ int menu_hash_get_help_pt_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
case MENU_ENUM_LABEL_VIDEO_REFRESH_RATE_AUTO:
|
||||
{
|
||||
/* Work around C89 limitations */
|
||||
char u[501];
|
||||
char t[501];
|
||||
snprintf(u, sizeof(u),
|
||||
const char * u =
|
||||
"Taxa de Atualização Automática.\n"
|
||||
" \n"
|
||||
"A taxa de atualização exata de nosso monitor (Hz).\n"
|
||||
@ -505,8 +503,8 @@ int menu_hash_get_help_pt_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
" \n"
|
||||
"audio_input_rate = game input rate * display \n"
|
||||
"refresh rate / game refresh rate\n"
|
||||
" \n");
|
||||
snprintf(t, sizeof(t),
|
||||
" \n";
|
||||
const char * t =
|
||||
"Se a implementação não informar valores, \n"
|
||||
"valores NTSC serão assumidos por questão de \n"
|
||||
"compatibilidade.\n"
|
||||
@ -514,7 +512,7 @@ int menu_hash_get_help_pt_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Esse valor deve ficar próximo de 60Hz para \n"
|
||||
"evitar grande mudanças de pitch. Se o monitor \n"
|
||||
"não rodar a 60Hz, ou algo próximo a isso, desative\n"
|
||||
"o VSync, e deixe-o com valores padrão.");
|
||||
"o VSync, e deixe-o com valores padrão.";
|
||||
strlcpy(s, u, len);
|
||||
strlcat(s, t, len);
|
||||
}
|
||||
|
@ -625,9 +625,7 @@ int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
{
|
||||
/* Work around C89 limitations */
|
||||
char u[501];
|
||||
char t[501];
|
||||
|
||||
strlcpy(t,
|
||||
const char * t =
|
||||
"RetroArch relies on an unique form of\n"
|
||||
"audio/video synchronization where it needs to be\n"
|
||||
"calibrated against the refresh rate of your\n"
|
||||
@ -636,8 +634,8 @@ int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"If you experience any audio crackling or video\n"
|
||||
"tearing, usually it means that you need to\n"
|
||||
"calibrate the settings. Some choices below:\n"
|
||||
" \n", sizeof(t));
|
||||
snprintf(u, sizeof(u),
|
||||
" \n";
|
||||
snprintf(u, sizeof(u), /* can't inline this due to the printf arguments */
|
||||
"a) Go to '%s' -> '%s', and enable\n"
|
||||
"'Threaded Video'. Refresh rate will not matter\n"
|
||||
"in this mode, framerate will be higher,\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user