Skip to content

Commit

Permalink
driver.c - Cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Sep 16, 2016
1 parent e3c5600 commit 7c0ba42
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
int i = driver_find_index(label, s);

if (i > 0)
find_driver_nonempty(label, i - 1, s, len);
else
{
RARCH_WARN(
"Couldn't find any previous driver (current one: \"%s\").\n", s);
return false;
find_driver_nonempty(label, i - 1, s, len);
return true;
}
return true;

RARCH_WARN(
"Couldn't find any previous driver (current one: \"%s\").\n", s);
return false;
}

/**
Expand All @@ -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)
{
int i = driver_find_index(label, s);

if (i >= 0 && !string_is_equal(s, "null"))
find_driver_nonempty(label, i + 1, s, len);
else
{
RARCH_WARN("%s (current one: \"%s\").\n",
msg_hash_to_str(MSG_COULD_NOT_FIND_ANY_NEXT_DRIVER),
s);
return false;
find_driver_nonempty(label, i + 1, s, len);
return true;
}
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)
Expand Down

0 comments on commit 7c0ba42

Please sign in to comment.