mirror of
https://github.com/libretro/RetroArch
synced 2025-04-02 07:20:34 +00:00
Replace more strstrs
This commit is contained in:
parent
d2d16ea171
commit
44a254264b
@ -1785,17 +1785,14 @@ int menu_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *cbs,
|
|||||||
if (!cbs)
|
if (!cbs)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (strstr(label, "joypad_index") && strstr(label, "input_player"))
|
if ( string_starts_with(label, "input_player") &&
|
||||||
|
string_ends_with(label, "joypad_index")
|
||||||
|
)
|
||||||
{
|
{
|
||||||
BIND_ACTION_GET_VALUE(cbs, menu_action_setting_disp_set_label);
|
BIND_ACTION_GET_VALUE(cbs, menu_action_setting_disp_set_label);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
RARCH_LOG("MENU_SETTINGS_NONE: %d\n", MENU_SETTINGS_NONE);
|
|
||||||
RARCH_LOG("MENU_SETTINGS_LAST: %d\n", MENU_SETTINGS_LAST);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (cbs->enum_idx != MSG_UNKNOWN)
|
if (cbs->enum_idx != MSG_UNKNOWN)
|
||||||
{
|
{
|
||||||
switch (cbs->enum_idx)
|
switch (cbs->enum_idx)
|
||||||
|
@ -821,7 +821,8 @@ static int menu_cbs_init_bind_left_compare_label(menu_file_list_cbs_t *cbs,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strstr(label, "input_player") && strstr(label, "_joypad_index"))
|
if ( string_starts_with(label, "input_player") &&
|
||||||
|
string_ends_with(label, "_joypad_index"))
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
for (i = 0; i < MAX_USERS; i++)
|
for (i = 0; i < MAX_USERS; i++)
|
||||||
|
@ -946,7 +946,8 @@ static int menu_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *cbs,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strstr(label, "input_player") && strstr(label, "_joypad_index"))
|
if ( string_starts_with(label, "input_player") &&
|
||||||
|
string_ends_with(label, "_joypad_index"))
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
for (i = 0; i < MAX_USERS; i++)
|
for (i = 0; i < MAX_USERS; i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user