mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
driver.c - Cleanups
This commit is contained in:
parent
e3c560014c
commit
7c0ba42c09
28
driver.c
28
driver.c
@ -167,15 +167,16 @@ static bool driver_find_first(const char *label, char *s, size_t len)
|
|||||||
static bool driver_find_prev(const char *label, char *s, size_t len)
|
static bool driver_find_prev(const char *label, char *s, size_t len)
|
||||||
{
|
{
|
||||||
int i = driver_find_index(label, s);
|
int i = driver_find_index(label, s);
|
||||||
|
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
find_driver_nonempty(label, i - 1, s, len);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
RARCH_WARN(
|
find_driver_nonempty(label, i - 1, s, len);
|
||||||
"Couldn't find any previous driver (current one: \"%s\").\n", s);
|
return true;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
|
RARCH_WARN(
|
||||||
|
"Couldn't find any previous driver (current one: \"%s\").\n", s);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -189,16 +190,17 @@ static bool driver_find_prev(const char *label, char *s, size_t len)
|
|||||||
bool driver_find_next(const char *label, char *s, size_t len)
|
bool driver_find_next(const char *label, char *s, size_t len)
|
||||||
{
|
{
|
||||||
int i = driver_find_index(label, s);
|
int i = driver_find_index(label, s);
|
||||||
|
|
||||||
if (i >= 0 && !string_is_equal(s, "null"))
|
if (i >= 0 && !string_is_equal(s, "null"))
|
||||||
find_driver_nonempty(label, i + 1, s, len);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
RARCH_WARN("%s (current one: \"%s\").\n",
|
find_driver_nonempty(label, i + 1, s, len);
|
||||||
msg_hash_to_str(MSG_COULD_NOT_FIND_ANY_NEXT_DRIVER),
|
return true;
|
||||||
s);
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
|
RARCH_WARN("%s (current one: \"%s\").\n",
|
||||||
|
msg_hash_to_str(MSG_COULD_NOT_FIND_ANY_NEXT_DRIVER),
|
||||||
|
s);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void driver_adjust_system_rates(void)
|
static void driver_adjust_system_rates(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user