mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 10:10:57 +00:00
Rewrite more string_is_equal call invocations as memcmp
This commit is contained in:
parent
d77da6b53d
commit
6ebd4e139e
@ -370,7 +370,7 @@ static void *alsa_device_list_new(void *data)
|
||||
/* description of device IOID - input / output identifcation
|
||||
* ("Input" or "Output"), NULL means both) */
|
||||
|
||||
if (!io || string_is_equal(io,"Output"))
|
||||
if (!io || (memcmp(io, "Output", 6) == 0))
|
||||
string_list_append(s, name, attr);
|
||||
|
||||
if (name)
|
||||
|
@ -370,7 +370,7 @@ static void *alsa_device_list_new(void *data)
|
||||
/* description of device IOID - input / output identifcation
|
||||
* ("Input" or "Output"), NULL means both) */
|
||||
|
||||
if (!io || string_is_equal(io,"Output"))
|
||||
if (!io || (memcmp(io,"Output", 6) == 0))
|
||||
string_list_append(s, name, attr);
|
||||
|
||||
if (name)
|
||||
|
@ -959,7 +959,7 @@ static bool frontend_linux_powerstate_check_apm(
|
||||
|
||||
if (!next_string(&ptr, &str)) /* remaining battery life time units */
|
||||
goto error;
|
||||
else if (string_is_equal(str, "min"))
|
||||
else if (memcmp(str, "min", 3) == 0)
|
||||
battery_time *= 60;
|
||||
|
||||
if (battery_flag == 0xFF) /* unknown state */
|
||||
@ -1289,7 +1289,7 @@ static void frontend_linux_get_env(int *argc,
|
||||
if (android_app->getStringExtra && jstr)
|
||||
{
|
||||
const char *argv = (*env)->GetStringUTFChars(env, jstr, 0);
|
||||
bool used = (string_is_equal(argv, "false")) ? false : true;
|
||||
bool used = (memcmp(argv, "false", 5) == 0) ? false : true;
|
||||
|
||||
(*env)->ReleaseStringUTFChars(env, jstr, argv);
|
||||
|
||||
|
@ -314,7 +314,7 @@ static bool d3d_init_multipass(d3d_video_t *d3d)
|
||||
static bool d3d_process_shader(d3d_video_t *d3d)
|
||||
{
|
||||
#ifdef HAVE_FBO
|
||||
if (string_is_equal(path_get_extension(d3d->shader_path.c_str()), "cgp"))
|
||||
if (memcmp(path_get_extension(d3d->shader_path.c_str()), "cgp", 3) == 0)
|
||||
return d3d_init_multipass(d3d);
|
||||
#endif
|
||||
|
||||
|
@ -499,22 +499,22 @@ static void registry_handle_global(void *data, struct wl_registry *reg,
|
||||
|
||||
(void)version;
|
||||
|
||||
if (string_is_equal(interface, "wl_compositor"))
|
||||
if (memcmp(interface, "wl_compositor", 13) == 0)
|
||||
wl->compositor = (struct wl_compositor*)wl_registry_bind(reg,
|
||||
id, &wl_compositor_interface, 3);
|
||||
else if (string_is_equal(interface, "wl_output"))
|
||||
else if (memcmp(interface, "wl_output", 9) == 0)
|
||||
{
|
||||
output = (struct wl_output*)wl_registry_bind(reg,
|
||||
id, &wl_output_interface, 2);
|
||||
wl_output_add_listener(output, &output_listener, wl);
|
||||
wl_display_roundtrip(wl->dpy);
|
||||
}
|
||||
else if (string_is_equal(interface, "wl_shell"))
|
||||
else if (memcmp(interface, "wl_shell", 8) == 0)
|
||||
wl->shell = (struct wl_shell*)
|
||||
wl_registry_bind(reg, id, &wl_shell_interface, 1);
|
||||
else if (string_is_equal(interface, "wl_shm"))
|
||||
else if (memcmp(interface, "wl_shm", 6) == 0)
|
||||
wl->shm = (struct wl_shm*)wl_registry_bind(reg, id, &wl_shm_interface, 1);
|
||||
else if (string_is_equal(interface, "wl_seat"))
|
||||
else if (memcmp(interface, "wl_seat", 7) == 0)
|
||||
{
|
||||
wl->seat = (struct wl_seat*)wl_registry_bind(reg, id, &wl_seat_interface, 4);
|
||||
wl_seat_add_listener(wl->seat, &seat_listener, wl);
|
||||
|
@ -753,7 +753,7 @@ int menu_hash_get_help_chs_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len,
|
||||
"当前视频驱动.");
|
||||
|
||||
if (string_is_equal(settings->video.driver, "gl"))
|
||||
if (memcmp(settings->video.driver, "gl", 2) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"OpenGL视频驱动. \n"
|
||||
@ -767,7 +767,7 @@ int menu_hash_get_help_chs_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"dependent on your graphics card's \n"
|
||||
"underlying GL driver).");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sdl2"))
|
||||
else if (memcmp(settings->video.driver, "sdl2", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"SDL 2 视频驱动.\n"
|
||||
@ -779,7 +779,7 @@ int menu_hash_get_help_chs_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"core implementations is dependent \n"
|
||||
"on your platform SDL implementation.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sdl1"))
|
||||
else if (memcmp(settings->video.driver, "sdl1", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"SDL 视频驱动.\n"
|
||||
@ -790,7 +790,7 @@ int menu_hash_get_help_chs_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Performance is considered to be suboptimal. \n"
|
||||
"Consider using it only as a last resort.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "d3d"))
|
||||
else if (memcmp(settings->video.driver, "d3d", 3) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Direct3D 视频驱动. \n"
|
||||
@ -799,7 +799,7 @@ int menu_hash_get_help_chs_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"is dependent on your graphic card's \n"
|
||||
"underlying D3D driver).");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "exynos"))
|
||||
else if (memcmp(settings->video.driver, "exynos", 6) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Exynos-G2D 视频驱动. \n"
|
||||
@ -811,7 +811,7 @@ int menu_hash_get_help_chs_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Performance for software rendered cores \n"
|
||||
"should be optimal.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "drm"))
|
||||
else if (memcmp(settings->video.driver, "drm", 3) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Plain DRM 视频驱动. \n"
|
||||
@ -820,7 +820,7 @@ int menu_hash_get_help_chs_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"libdrm for hardware scaling using \n"
|
||||
"GPU overlays.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sunxi"))
|
||||
else if (memcmp(settings->video.driver, "sunxi", 5) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Sunxi-G2D 视频驱动. \n"
|
||||
|
@ -771,7 +771,7 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len,
|
||||
"Aktueller Grafiktreiber");
|
||||
|
||||
if (string_is_equal(settings->video.driver, "gl"))
|
||||
if (memcmp(settings->video.driver, "gl", 2) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"OpenGL-Grafiktreiber. \n"
|
||||
@ -784,7 +784,7 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"als auch bei libretro-GL-Cores, hängt von dem \n"
|
||||
"GL-Treiber deiner Grafikkarte ab.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sdl2"))
|
||||
else if (memcmp(settings->video.driver, "sdl2", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"SDL2-Grafiktreiber.\n"
|
||||
@ -795,7 +795,7 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Die Leistung hängt von der SDL- \n"
|
||||
"Implementierung deiner Plattform ab.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sdl1"))
|
||||
else if (memcmp(settings->video.driver, "sdl1", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"SDL-Grafiktreiber.\n"
|
||||
@ -807,7 +807,7 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"solltest diesen Treiber nur als letzte \n"
|
||||
"Möglichkeit verwenden.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "d3d"))
|
||||
else if (memcmp(settings->video.driver, "d3d", 3) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Direct3D-Grafiktreiber. \n"
|
||||
@ -816,7 +816,7 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Cores hängt von dem D3D-Treiber deiner \n"
|
||||
"Grafikkarte ab.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "exynos"))
|
||||
else if (memcmp(settings->video.driver, "exynos", 6) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Exynos-G2D-Grafiktreiber. \n"
|
||||
@ -828,7 +828,7 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Die Leistung bei software-gerendeten Cores sollte \n"
|
||||
"optimal sein.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "drm"))
|
||||
else if (memcmp(settings->video.driver, "drm", 3) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"DRM-Grafiktreiber \n"
|
||||
@ -837,7 +837,7 @@ int menu_hash_get_help_de_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Er verwendet libdrm für Hardware-Skalierung und \n"
|
||||
"GPU-Overlays.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sunxi"))
|
||||
else if (memcmp(settings->video.driver, "sunxi", 5) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Sunxi-G2D-Grafiktreiber\n"
|
||||
@ -2032,7 +2032,7 @@ const char *msg_hash_to_str_de(enum msg_hash_enums msg)
|
||||
#ifdef HAVE_MENU
|
||||
const char *ret = menu_hash_to_str_de_label_enum(msg);
|
||||
|
||||
if (ret && !string_is_equal(ret, "null"))
|
||||
if (ret && (memcmp(ret, "null", 4) != 0))
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
|
@ -232,7 +232,7 @@ int menu_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len,
|
||||
"Controlador de vídeo actual.");
|
||||
|
||||
if (string_is_equal(settings->video.driver, "gl"))
|
||||
if (memcmp(settings->video.driver, "gl", 2) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Controlador de vídeo OpenGL. \n"
|
||||
@ -247,7 +247,7 @@ int menu_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"del controlador GL que tenga tu \n"
|
||||
"tarjeta gráfica.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sdl2"))
|
||||
else if (memcmp(settings->video.driver, "sdl2", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Controlador de vídeo SDL 2.\n"
|
||||
@ -259,7 +259,7 @@ int menu_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"libretro por software depende de la \n"
|
||||
"implementación SDL de tu plataforma.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sdl1"))
|
||||
else if (memcmp(settings->video.driver, "sdl1", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Controlador de vídeo SDL.\n"
|
||||
@ -271,7 +271,7 @@ int menu_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"a lo óptimo. Utilízalo únicamente como \n"
|
||||
"último recurso.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "d3d"))
|
||||
else if (memcmp(settings->video.driver, "d3d", 3) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Controlador de vídeo Direct3D. \n"
|
||||
@ -281,7 +281,7 @@ int menu_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"del controlador D3D de tu tarjeta \n"
|
||||
"gráfica.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "exynos"))
|
||||
else if (memcmp(settings->video.driver, "exynos", 6) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Controlador de vídeo Exynos-G2D. \n"
|
||||
@ -295,7 +295,7 @@ int menu_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"renderizados por software debería \n"
|
||||
"ser óptimo.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "drm"))
|
||||
else if (memcmp(settings->video.driver, "drm", 3) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Controlador de vídeo de DRM simple. \n"
|
||||
@ -306,7 +306,7 @@ int menu_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
" \n"
|
||||
"El blitting se hace por software.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sunxi"))
|
||||
else if (memcmp(settings->video.driver, "sunxi", 5) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Controlador de vídeo Sunxi-G2D. \n"
|
||||
|
@ -207,7 +207,7 @@ int menu_hash_get_help_it_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len,
|
||||
"Driver video attuale.");
|
||||
|
||||
if (string_is_equal(settings->video.driver, "gl"))
|
||||
if (memcmp(settings->video.driver, "gl", 2) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Diver video OpenGL. \n"
|
||||
@ -221,7 +221,7 @@ int menu_hash_get_help_it_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"dalla tua scheda grafica \n"
|
||||
"sottostante driver GL).");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sdl2"))
|
||||
else if (memcmp(settings->video.driver, "sdl2", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Driver video SDL 2.\n"
|
||||
@ -233,7 +233,7 @@ int menu_hash_get_help_it_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"renderizzati via software dipende \n"
|
||||
"dall'implementazzione sulla tua piattaforma SDL.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sdl1"))
|
||||
else if (memcmp(settings->video.driver, "sdl1", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Driver video SDL.\n"
|
||||
@ -244,7 +244,7 @@ int menu_hash_get_help_it_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Le performance sono considerate quasi ottimali. \n"
|
||||
"Considera di usare questo soltanto come ultima scelta.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "d3d"))
|
||||
else if (memcmp(settings->video.driver, "d3d", 3) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Driver video Direct3D. \n"
|
||||
@ -253,7 +253,7 @@ int menu_hash_get_help_it_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"software dipende dal driver D3D inerente \n"
|
||||
"alla tua scheda video).");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "exynos"))
|
||||
else if (memcmp(settings->video.driver, "exynos", 6) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Exynos-G2D Video Driver. \n"
|
||||
@ -265,7 +265,7 @@ int menu_hash_get_help_it_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Le performance per i core renderizzati via software \n"
|
||||
"dovrebbero essere ottimali.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sunxi"))
|
||||
else if (memcmp(settings->video.driver, "sunxi", 5) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Driver video Sunxi-G2D. \n"
|
||||
|
@ -780,7 +780,7 @@ int menu_hash_get_help_jp_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len,
|
||||
"Current Video driver.");
|
||||
|
||||
if (string_is_equal(settings->video.driver, "gl"))
|
||||
if (memcmp(settings->video.driver, "gl", 2) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"OpenGL Video driver. \n"
|
||||
@ -794,7 +794,7 @@ int menu_hash_get_help_jp_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"dependent on your graphics card's \n"
|
||||
"underlying GL driver).");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sdl2"))
|
||||
else if (memcmp(settings->video.driver, "sdl2", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"SDL 2 Video driver.\n"
|
||||
@ -806,7 +806,7 @@ int menu_hash_get_help_jp_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"core implementations is dependent \n"
|
||||
"on your platform SDL implementation.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sdl1"))
|
||||
else if (memcmp(settings->video.driver, "sdl1", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"SDL Video driver.\n"
|
||||
@ -817,7 +817,7 @@ int menu_hash_get_help_jp_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Performance is considered to be suboptimal. \n"
|
||||
"Consider using it only as a last resort.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "d3d"))
|
||||
else if (memcmp(settings->video.driver, "d3d", 3) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Direct3D Video driver. \n"
|
||||
@ -826,7 +826,7 @@ int menu_hash_get_help_jp_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"is dependent on your graphic card's \n"
|
||||
"underlying D3D driver).");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "exynos"))
|
||||
else if (memcmp(settings->video.driver, "exynos", 6) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Exynos-G2D Video Driver. \n"
|
||||
@ -838,7 +838,7 @@ int menu_hash_get_help_jp_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Performance for software rendered cores \n"
|
||||
"should be optimal.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "drm"))
|
||||
else if (memcmp(settings->video.driver, "drm", 3) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Plain DRM Video Driver. \n"
|
||||
@ -847,7 +847,7 @@ int menu_hash_get_help_jp_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"libdrm for hardware scaling using \n"
|
||||
"GPU overlays.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sunxi"))
|
||||
else if (memcmp(settings->video.driver, "sunxi", 5) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Sunxi-G2D Video Driver. \n"
|
||||
|
@ -769,67 +769,79 @@ int menu_hash_get_help_ko_enum(enum msg_hash_enums msg, char *s, size_t len) {
|
||||
snprintf(s, len,
|
||||
"Current Video driver.");
|
||||
|
||||
if (string_is_equal(settings->video.driver, "gl")) {
|
||||
snprintf(s, len,
|
||||
"OpenGL Video driver. \n"
|
||||
" \n"
|
||||
"This driver allows libretro GL cores to \n"
|
||||
"be used in addition to software-rendered \n"
|
||||
"core implementations.\n"
|
||||
" \n"
|
||||
"Performance for software-rendered and \n"
|
||||
"libretro GL core implementations is \n"
|
||||
"dependent on your graphics card's \n"
|
||||
"underlying GL driver).");
|
||||
} else if (string_is_equal(settings->video.driver, "sdl2")) {
|
||||
snprintf(s, len,
|
||||
"SDL 2 Video driver.\n"
|
||||
" \n"
|
||||
"This is an SDL 2 software-rendered video \n"
|
||||
"driver.\n"
|
||||
" \n"
|
||||
"Performance for software-rendered libretro \n"
|
||||
"core implementations is dependent \n"
|
||||
"on your platform SDL implementation.");
|
||||
} else if (string_is_equal(settings->video.driver, "sdl1")) {
|
||||
snprintf(s, len,
|
||||
"SDL Video driver.\n"
|
||||
" \n"
|
||||
"This is an SDL 1.2 software-rendered video \n"
|
||||
"driver.\n"
|
||||
" \n"
|
||||
"Performance is considered to be suboptimal. \n"
|
||||
"Consider using it only as a last resort.");
|
||||
} else if (string_is_equal(settings->video.driver, "d3d")) {
|
||||
snprintf(s, len,
|
||||
"Direct3D Video driver. \n"
|
||||
" \n"
|
||||
"Performance for software-rendered cores \n"
|
||||
"is dependent on your graphic card's \n"
|
||||
"underlying D3D driver).");
|
||||
} else if (string_is_equal(settings->video.driver, "exynos")) {
|
||||
snprintf(s, len,
|
||||
"Exynos-G2D Video Driver. \n"
|
||||
" \n"
|
||||
"This is a low-level Exynos video driver. \n"
|
||||
"Uses the G2D block in Samsung Exynos SoC \n"
|
||||
"for blit operations. \n"
|
||||
" \n"
|
||||
"Performance for software rendered cores \n"
|
||||
"should be optimal.");
|
||||
} else if (string_is_equal(settings->video.driver, "drm")) {
|
||||
snprintf(s, len,
|
||||
"Plain DRM Video Driver. \n"
|
||||
" \n"
|
||||
"This is a low-level video driver using. \n"
|
||||
"libdrm for hardware scaling using \n"
|
||||
"GPU overlays.");
|
||||
} else if (string_is_equal(settings->video.driver, "sunxi")) {
|
||||
snprintf(s, len,
|
||||
"Sunxi-G2D Video Driver. \n"
|
||||
" \n"
|
||||
"This is a low-level Sunxi video driver. \n"
|
||||
"Uses the G2D block in Allwinner SoCs.");
|
||||
if (memcmp(settings->video.driver, "gl", 2) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"OpenGL Video driver. \n"
|
||||
" \n"
|
||||
"This driver allows libretro GL cores to \n"
|
||||
"be used in addition to software-rendered \n"
|
||||
"core implementations.\n"
|
||||
" \n"
|
||||
"Performance for software-rendered and \n"
|
||||
"libretro GL core implementations is \n"
|
||||
"dependent on your graphics card's \n"
|
||||
"underlying GL driver).");
|
||||
}
|
||||
else if (memcmp(settings->video.driver, "sdl2", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"SDL 2 Video driver.\n"
|
||||
" \n"
|
||||
"This is an SDL 2 software-rendered video \n"
|
||||
"driver.\n"
|
||||
" \n"
|
||||
"Performance for software-rendered libretro \n"
|
||||
"core implementations is dependent \n"
|
||||
"on your platform SDL implementation.");
|
||||
}
|
||||
else if (memcmp(settings->video.driver, "sdl1", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"SDL Video driver.\n"
|
||||
" \n"
|
||||
"This is an SDL 1.2 software-rendered video \n"
|
||||
"driver.\n"
|
||||
" \n"
|
||||
"Performance is considered to be suboptimal. \n"
|
||||
"Consider using it only as a last resort.");
|
||||
}
|
||||
else if (memcmp(settings->video.driver, "d3d", 3) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Direct3D Video driver. \n"
|
||||
" \n"
|
||||
"Performance for software-rendered cores \n"
|
||||
"is dependent on your graphic card's \n"
|
||||
"underlying D3D driver).");
|
||||
}
|
||||
else if (memcmp(settings->video.driver, "exynos", 6) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Exynos-G2D Video Driver. \n"
|
||||
" \n"
|
||||
"This is a low-level Exynos video driver. \n"
|
||||
"Uses the G2D block in Samsung Exynos SoC \n"
|
||||
"for blit operations. \n"
|
||||
" \n"
|
||||
"Performance for software rendered cores \n"
|
||||
"should be optimal.");
|
||||
} else if (memcmp(settings->video.driver, "drm", 3) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Plain DRM Video Driver. \n"
|
||||
" \n"
|
||||
"This is a low-level video driver using. \n"
|
||||
"libdrm for hardware scaling using \n"
|
||||
"GPU overlays.");
|
||||
}
|
||||
else if (memcmp(settings->video.driver, "sunxi", 5) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Sunxi-G2D Video Driver. \n"
|
||||
" \n"
|
||||
"This is a low-level Sunxi video driver. \n"
|
||||
"Uses the G2D block in Allwinner SoCs.");
|
||||
}
|
||||
break;
|
||||
case MENU_ENUM_LABEL_AUDIO_DSP_PLUGIN:
|
||||
@ -1986,7 +1998,7 @@ const char *msg_hash_to_str_ko(enum msg_hash_enums msg) {
|
||||
#ifdef HAVE_MENU
|
||||
const char *ret = menu_hash_to_str_ko_label_enum(msg);
|
||||
|
||||
if (ret && !string_is_equal(ret, "null"))
|
||||
if (ret && (memcmp(ret, "null", 4) != 0))
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
|
@ -108,7 +108,7 @@ int menu_hash_get_help_pt_br_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len,
|
||||
"Driver de Vídeo em uso.");
|
||||
|
||||
if (string_is_equal(settings->video.driver, "gl"))
|
||||
if (memcmp(settings->video.driver, "gl", 2) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Driver de Vídeo OpenGL. \n"
|
||||
@ -122,7 +122,7 @@ int menu_hash_get_help_pt_br_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"depende do driver GL instalado em sua \n"
|
||||
"placa de vídeo.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sdl2"))
|
||||
else if (memcmp(settings->video.driver, "sdl2", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Driver de Vídeo SDL 2.\n"
|
||||
@ -134,7 +134,7 @@ int menu_hash_get_help_pt_br_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"renderização por software depende da \n"
|
||||
"implementação SDL de sua plataforma.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sdl1"))
|
||||
else if (memcmp(settings->video.driver, "sdl1", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Driver de Vídeo SDL.\n"
|
||||
@ -145,7 +145,7 @@ int menu_hash_get_help_pt_br_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"O desemprenho é considerado subótimo. \n"
|
||||
"Considere seu uso apenas em último caso.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "d3d"))
|
||||
else if (memcmp(settings->video.driver, "d3d", 3) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Driver de Vídeo Direct3D. \n"
|
||||
@ -154,7 +154,7 @@ int menu_hash_get_help_pt_br_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"renderização por software depende do driver \n"
|
||||
"D3D instalado em sua placa de vídeo.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "exynos"))
|
||||
else if (memcmp(settings->video.driver, "exynos", 6) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Driver de Vídeo Exynos-G2D. \n"
|
||||
@ -166,7 +166,7 @@ int menu_hash_get_help_pt_br_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"O desempenho para cores de renderização por \n"
|
||||
"software deve ser ótimo.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sunxi"))
|
||||
else if (memcmp(settings->video.driver, "sunxi", 5) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Driver de Vídeo Sunxi-G2D. \n"
|
||||
|
@ -108,7 +108,7 @@ int menu_hash_get_help_pt_pt_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len,
|
||||
"Driver de Vídeo em uso.");
|
||||
|
||||
if (string_is_equal(settings->video.driver, "gl"))
|
||||
if (memcmp(settings->video.driver, "gl", 2) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Driver de Vídeo OpenGL. \n"
|
||||
@ -122,7 +122,7 @@ int menu_hash_get_help_pt_pt_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"depende do driver GL instalado em sua \n"
|
||||
"placa de vídeo.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sdl2"))
|
||||
else if (memcmp(settings->video.driver, "sdl2", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Driver de Vídeo SDL 2.\n"
|
||||
@ -134,7 +134,7 @@ int menu_hash_get_help_pt_pt_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"renderização por software depende da \n"
|
||||
"implementação SDL de sua plataforma.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sdl1"))
|
||||
else if (memcmp(settings->video.driver, "sdl1", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Driver de Vídeo SDL.\n"
|
||||
@ -145,7 +145,7 @@ int menu_hash_get_help_pt_pt_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"O desemprenho é considerado subótimo. \n"
|
||||
"Considere seu uso apenas em último caso.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "d3d"))
|
||||
else if (memcmp(settings->video.driver, "d3d", 3) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Driver de Vídeo Direct3D. \n"
|
||||
@ -154,7 +154,7 @@ int menu_hash_get_help_pt_pt_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"renderização por software depende do driver \n"
|
||||
"D3D instalado em sua placa de vídeo.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "exynos"))
|
||||
else if (memcmp(settings->video.driver, "exynos", 6) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Driver de Vídeo Exynos-G2D. \n"
|
||||
@ -166,7 +166,7 @@ int menu_hash_get_help_pt_pt_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"O desempenho para cores de renderização por \n"
|
||||
"software deve ser ótimo.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sunxi"))
|
||||
else if (memcmp(settings->video.driver, "sunxi", 5) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Driver de Vídeo Sunxi-G2D. \n"
|
||||
|
@ -780,7 +780,7 @@ int menu_hash_get_help_vn_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
snprintf(s, len,
|
||||
"Current Video driver.");
|
||||
|
||||
if (string_is_equal(settings->video.driver, "gl"))
|
||||
if (memcmp(settings->video.driver, "gl", 2) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"OpenGL Video driver. \n"
|
||||
@ -794,7 +794,7 @@ int menu_hash_get_help_vn_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"dependent on your graphics card's \n"
|
||||
"underlying GL driver).");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sdl2"))
|
||||
else if (memcmp(settings->video.driver, "sdl2", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"SDL 2 Video driver.\n"
|
||||
@ -806,7 +806,7 @@ int menu_hash_get_help_vn_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"core implementations is dependent \n"
|
||||
"on your platform SDL implementation.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sdl1"))
|
||||
else if (memcmp(settings->video.driver, "sdl1", 4) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"SDL Video driver.\n"
|
||||
@ -817,7 +817,7 @@ int menu_hash_get_help_vn_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Performance is considered to be suboptimal. \n"
|
||||
"Consider using it only as a last resort.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "d3d"))
|
||||
else if (memcmp(settings->video.driver, "d3d", 3) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Direct3D Video driver. \n"
|
||||
@ -826,7 +826,7 @@ int menu_hash_get_help_vn_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"is dependent on your graphic card's \n"
|
||||
"underlying D3D driver).");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "exynos"))
|
||||
else if (memcmp(settings->video.driver, "exynos", 6) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Exynos-G2D Video Driver. \n"
|
||||
@ -838,7 +838,7 @@ int menu_hash_get_help_vn_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"Performance for software rendered cores \n"
|
||||
"should be optimal.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "drm"))
|
||||
else if (memcmp(settings->video.driver, "drm", 3) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Plain DRM Video Driver. \n"
|
||||
@ -847,7 +847,7 @@ int menu_hash_get_help_vn_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
"libdrm for hardware scaling using \n"
|
||||
"GPU overlays.");
|
||||
}
|
||||
else if (string_is_equal(settings->video.driver, "sunxi"))
|
||||
else if (memcmp(settings->video.driver, "sunxi", 5) == 0)
|
||||
{
|
||||
snprintf(s, len,
|
||||
"Sunxi-G2D Video Driver. \n"
|
||||
|
@ -324,7 +324,7 @@ struct http_t *net_http_new(struct http_connection_t *conn)
|
||||
net_http_send_str(fd, &error, "\r\n");
|
||||
}
|
||||
|
||||
if (conn->methodcopy && string_is_equal(conn->methodcopy, "POST"))
|
||||
if (conn->methodcopy && (memcmp(conn->methodcopy, "POST", 4) == 0))
|
||||
{
|
||||
size_t post_len, len;
|
||||
char *len_str = NULL;
|
||||
@ -361,7 +361,7 @@ struct http_t *net_http_new(struct http_connection_t *conn)
|
||||
net_http_send_str(fd, &error, "Connection: close\r\n");
|
||||
net_http_send_str(fd, &error, "\r\n");
|
||||
|
||||
if (conn->methodcopy && string_is_equal(conn->methodcopy, "POST"))
|
||||
if (conn->methodcopy && (memcmp(conn->methodcopy, "POST", 4) == 0))
|
||||
net_http_send_str(fd, &error, conn->postdatacopy);
|
||||
|
||||
if (error)
|
||||
|
@ -61,7 +61,7 @@ int main(int argc, char ** argv)
|
||||
printf("Could not open db file '%s': %s\n", path, strerror(-rv));
|
||||
goto error;
|
||||
}
|
||||
else if (string_is_equal(command, "list"))
|
||||
else if (memcmp(command, "list", 4) == 0)
|
||||
{
|
||||
if ((rv = libretrodb_cursor_open(db, cur, NULL)) != 0)
|
||||
{
|
||||
@ -82,7 +82,7 @@ int main(int argc, char ** argv)
|
||||
rmsgpack_dom_value_free(&item);
|
||||
}
|
||||
}
|
||||
else if (string_is_equal(command, "find"))
|
||||
else if (memcmp(command, "find", 4) == 0)
|
||||
{
|
||||
if (argc != 4)
|
||||
{
|
||||
@ -113,7 +113,7 @@ int main(int argc, char ** argv)
|
||||
rmsgpack_dom_value_free(&item);
|
||||
}
|
||||
}
|
||||
else if (string_is_equal(command, "create-index"))
|
||||
else if (memcmp(command, "create-index", 12) == 0)
|
||||
{
|
||||
const char * index_name, * field_name;
|
||||
|
||||
|
@ -941,7 +941,7 @@ static void xmb_update_thumbnail_path(void *data, unsigned i)
|
||||
playlist_get_index(playlist, i,
|
||||
NULL, NULL, NULL, &core_name, NULL, NULL);
|
||||
|
||||
if (core_name && string_is_equal(core_name, "imageviewer"))
|
||||
if (core_name && (memcmp(core_name, "imageviewer", 11) == 0))
|
||||
{
|
||||
strlcpy(xmb->thumbnail_file_path, entry.label,
|
||||
sizeof(xmb->thumbnail_file_path));
|
||||
@ -1011,9 +1011,9 @@ static void xmb_update_savestate_thumbnail_path(void *data, unsigned i)
|
||||
xmb->savestate_thumbnail_file_path[0] = '\0';
|
||||
|
||||
if ( (settings->savestate_thumbnail_enable)
|
||||
&& (string_is_equal(entry.label, "state_slot")
|
||||
|| (string_is_equal(entry.label, "loadstate"))
|
||||
|| (string_is_equal(entry.label, "savestate"))))
|
||||
&& ((memcmp(entry.label, "state_slot", 10) == 0)
|
||||
|| (memcmp(entry.label, "loadstate", 9) == 0)
|
||||
|| (memcmp(entry.label, "savestate", 9) == 0)))
|
||||
{
|
||||
char path[PATH_MAX_LENGTH];
|
||||
global_t *global = global_get_ptr();
|
||||
|
@ -187,7 +187,7 @@ static void print_buf_lines(file_list_t *list, char *buf,
|
||||
|
||||
if (!string_is_empty(last))
|
||||
{
|
||||
if (!string_is_equal(last, "_libretro"))
|
||||
if (memcmp(last, "_libretro", 9) != 0)
|
||||
*last = '\0';
|
||||
}
|
||||
|
||||
@ -250,7 +250,7 @@ static int menu_displaylist_parse_netplay(
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_LAN_SCAN_SETTINGS),
|
||||
MENU_ENUM_LABEL_NETPLAY_LAN_SCAN_SETTINGS, MENU_SETTING_GROUP, 0, 0);
|
||||
|
||||
if (!string_is_equal(settings->menu.driver, "xmb"))
|
||||
if (memcmp(settings->menu.driver, "xmb", 3) != 0)
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_TAB),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_TAB),
|
||||
@ -2627,7 +2627,7 @@ static int menu_displaylist_parse_horizontal_list(
|
||||
|
||||
playlist_qsort(playlist);
|
||||
|
||||
if (string_is_equal(lpl_basename, "content_history"))
|
||||
if (memcmp(lpl_basename, "content_history", 15) == 0)
|
||||
is_historylist = true;
|
||||
|
||||
menu_displaylist_parse_playlist(info,
|
||||
@ -4798,7 +4798,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
info->need_push = true;
|
||||
break;
|
||||
case DISPLAYLIST_WIFI_SETTINGS_LIST:
|
||||
if (string_is_equal(settings->wifi.driver, "null"))
|
||||
if (memcmp(settings->wifi.driver, "null", 4) == 0)
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_NETWORKS_FOUND),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_NO_NETWORKS_FOUND),
|
||||
@ -5394,7 +5394,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
MENU_ENUM_LABEL_LOGGING_SETTINGS, PARSE_ACTION, false);
|
||||
ret = menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_FRAME_THROTTLE_SETTINGS, PARSE_ACTION, false);
|
||||
if (!string_is_equal(settings->record.driver, "null"))
|
||||
if (memcmp(settings->record.driver, "null", 4) != 0)
|
||||
ret = menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_RECORDING_SETTINGS, PARSE_ACTION, false);
|
||||
ret = menu_displaylist_parse_settings_enum(menu, info,
|
||||
|
@ -98,16 +98,16 @@ void menu_event_osk_append(int ptr)
|
||||
menu_event_set_osk_idx(OSK_LOWERCASE_LATIN);
|
||||
else if (string_is_equal(osk_grid[ptr],"\xe2\x8a\x95")) /* plus sign (next button) */
|
||||
#else
|
||||
if (string_is_equal(osk_grid[ptr],"Bksp"))
|
||||
if (memcmp(osk_grid[ptr], "Bksp", 4) == 0)
|
||||
input_keyboard_event(true, '\x7f', '\x7f', 0, RETRO_DEVICE_KEYBOARD);
|
||||
else if (string_is_equal(osk_grid[ptr],"Enter"))
|
||||
else if (memcmp(osk_grid[ptr], "Enter", 5) == 0)
|
||||
input_keyboard_event(true, '\n', '\n', 0, RETRO_DEVICE_KEYBOARD);
|
||||
else
|
||||
if (string_is_equal(osk_grid[ptr],"Upper"))
|
||||
if (memcmp(osk_grid[ptr], "Upper", 5) == 0)
|
||||
menu_event_set_osk_idx(OSK_UPPERCASE_LATIN);
|
||||
else if (string_is_equal(osk_grid[ptr],"Lower"))
|
||||
else if (memcmp(osk_grid[ptr], "Lower", 5) == 0)
|
||||
menu_event_set_osk_idx(OSK_LOWERCASE_LATIN);
|
||||
else if (string_is_equal(osk_grid[ptr],"Next"))
|
||||
else if (memcmp(osk_grid[ptr], "Next", 4) == 0)
|
||||
#endif
|
||||
if (menu_event_get_osk_idx() < OSK_TYPE_LAST - 1)
|
||||
menu_event_set_osk_idx((enum osk_type)(menu_event_get_osk_idx() + 1));
|
||||
|
@ -147,7 +147,7 @@ const char *msg_hash_to_str(enum msg_hash_enums msg)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ret && !string_is_equal(ret, "null"))
|
||||
if (ret && (memcmp(ret, "null", 4) != 0))
|
||||
return ret;
|
||||
|
||||
end:
|
||||
|
@ -678,16 +678,16 @@ static void retroarch_parse_input(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
if (string_is_equal(optarg, "noload-nosave"))
|
||||
if (memcmp(optarg, "noload-nosave", 13) == 0)
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_SET_SRAM_LOAD_DISABLED, NULL);
|
||||
rarch_ctl(RARCH_CTL_SET_SRAM_SAVE_DISABLED, NULL);
|
||||
}
|
||||
else if (string_is_equal(optarg, "noload-save"))
|
||||
else if (memcmp(optarg, "noload-save", 11) == 0)
|
||||
rarch_ctl(RARCH_CTL_SET_SRAM_LOAD_DISABLED, NULL);
|
||||
else if (string_is_equal(optarg, "load-nosave"))
|
||||
else if (memcmp(optarg, "load-nosave", 11) == 0)
|
||||
rarch_ctl(RARCH_CTL_SET_SRAM_SAVE_DISABLED, NULL);
|
||||
else if (!string_is_equal(optarg, "load-save"))
|
||||
else if (memcmp(optarg, "load-save", 9) != 0)
|
||||
{
|
||||
RARCH_ERR("Invalid argument in --sram-mode.\n");
|
||||
retroarch_print_help(argv[0]);
|
||||
|
@ -364,7 +364,7 @@ int detect_system(const char *track_path, const char **system_name)
|
||||
if (filestream_read(fd, magic, 8) > 0)
|
||||
{
|
||||
magic[8] = '\0';
|
||||
if (string_is_equal(magic, "PSP GAME"))
|
||||
if (memcmp(magic, "PSP GAME", 8) == 0)
|
||||
{
|
||||
*system_name = "psp\0";
|
||||
rv = 0;
|
||||
@ -401,7 +401,7 @@ int find_first_data_track(const char *cue_path,
|
||||
|
||||
while (get_token(fd, tmp_token, MAX_TOKEN_LEN) > 0)
|
||||
{
|
||||
if (string_is_equal(tmp_token, "FILE"))
|
||||
if (memcmp(tmp_token, "FILE", 4) == 0)
|
||||
{
|
||||
char cue_dir[PATH_MAX_LENGTH];
|
||||
|
||||
@ -413,12 +413,13 @@ int find_first_data_track(const char *cue_path,
|
||||
fill_pathname_join(track_path, cue_dir, tmp_token, max_len);
|
||||
|
||||
}
|
||||
else if (string_is_equal_noncase(tmp_token, "TRACK"))
|
||||
else if (memcmp(tmp_token, "TRACK", 5) == 0)
|
||||
{
|
||||
int m, s, f;
|
||||
get_token(fd, tmp_token, MAX_TOKEN_LEN);
|
||||
get_token(fd, tmp_token, MAX_TOKEN_LEN);
|
||||
if (string_is_equal_noncase(tmp_token, "AUDIO"))
|
||||
|
||||
if (memcmp(tmp_token, "AUDIO", 5) == 0)
|
||||
continue;
|
||||
|
||||
find_token(fd, "INDEX");
|
||||
|
@ -59,7 +59,7 @@ static void netplay_crc_scan_callback(void *task_data,
|
||||
|
||||
fflush(stdout);
|
||||
if (!string_is_empty(state->core_path) && !string_is_empty(state->content_path) &&
|
||||
!string_is_equal(state->content_path, "N/A"))
|
||||
memcmp(state->content_path, "N/A", 3) != 0)
|
||||
{
|
||||
command_event(CMD_EVENT_NETPLAY_INIT_DIRECT_DEFERRED, state->hostname);
|
||||
task_push_load_content_with_new_core_from_menu(
|
||||
@ -69,7 +69,7 @@ static void netplay_crc_scan_callback(void *task_data,
|
||||
NULL, NULL);
|
||||
}
|
||||
else if (!string_is_empty(state->core_path) && !string_is_empty(state->content_path) &&
|
||||
string_is_equal(state->content_path, "N/A"))
|
||||
memcmp(state->content_path, "N/A", 3) == 0)
|
||||
{
|
||||
content_ctx_info_t content_info = {0};
|
||||
|
||||
@ -111,11 +111,11 @@ static void task_netplay_crc_scan_handler(retro_task_t *task)
|
||||
}
|
||||
|
||||
if (state->lpl_list->size == 0 &&
|
||||
!string_is_equal(state->content_path, "N/A"))
|
||||
memcmp(state->content_path, "N/A", 3) != 0)
|
||||
goto no_playlists;
|
||||
|
||||
/* Core requires content */
|
||||
if (!string_is_equal(state->content_path, "N/A"))
|
||||
if (memcmp(state->content_path, "N/A", 3) != 0)
|
||||
{
|
||||
/* CRC matching */
|
||||
if (!string_is_equal(state->content_crc, "00000000|crc"))
|
||||
@ -285,7 +285,7 @@ bool task_push_netplay_crc_scan(uint32_t crc, char* name,
|
||||
{
|
||||
strlcpy(state->core_path, info->list[i].path, sizeof(state->core_path));
|
||||
|
||||
if (!string_is_equal(state->content_path, "N/A") &&
|
||||
if ((memcmp(state->content_path, "N/A", 3) != 0) &&
|
||||
!string_is_empty(info->list[i].supported_extensions))
|
||||
{
|
||||
strlcpy(state->core_extensions,
|
||||
|
@ -485,9 +485,9 @@ enum
|
||||
/* Get enabled orientations */
|
||||
apple_frontend_settings.orientation_flags = UIInterfaceOrientationMaskAll;
|
||||
|
||||
if (string_is_equal(apple_frontend_settings.orientations, "landscape"))
|
||||
if (memcmp(apple_frontend_settings.orientations, "landscape", 9) == 0)
|
||||
apple_frontend_settings.orientation_flags = UIInterfaceOrientationMaskLandscape;
|
||||
else if (string_is_equal(apple_frontend_settings.orientations, "portrait"))
|
||||
else if (memcmp(apple_frontend_settings.orientations, "portrait", 8) == 0)
|
||||
apple_frontend_settings.orientation_flags = UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user