Make set_option correctly return USB connect status.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16055 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a8b4c2d73a
commit
c4ebcbeaf4
1 changed files with 9 additions and 6 deletions
|
@ -566,12 +566,15 @@ bool set_option(const char* string, void* variable, enum optiontype type,
|
|||
temp = *(bool*)variable? 1: 0;
|
||||
else
|
||||
temp = *(int*)variable;
|
||||
option_screen(&item, false, NULL);
|
||||
if (type == BOOL)
|
||||
*(bool*)variable = (temp == 1? true: false);
|
||||
else
|
||||
*(int*)variable = temp;
|
||||
return false;
|
||||
if (!option_screen(&item, false, NULL))
|
||||
{
|
||||
if (type == BOOL)
|
||||
*(bool*)variable = (temp == 1? true: false);
|
||||
else
|
||||
*(int*)variable = temp;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool set_int_ex(const unsigned char* string,
|
||||
|
|
Loading…
Reference in a new issue