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:
Michael Sevakis 2008-01-11 17:43:07 +00:00
parent a8b4c2d73a
commit c4ebcbeaf4

View file

@ -566,12 +566,15 @@ bool set_option(const char* string, void* variable, enum optiontype type,
temp = *(bool*)variable? 1: 0; temp = *(bool*)variable? 1: 0;
else else
temp = *(int*)variable; temp = *(int*)variable;
option_screen(&item, false, NULL); if (!option_screen(&item, false, NULL))
if (type == BOOL) {
*(bool*)variable = (temp == 1? true: false); if (type == BOOL)
else *(bool*)variable = (temp == 1? true: false);
*(int*)variable = temp; else
return false; *(int*)variable = temp;
return false;
}
return true;
} }
bool set_int_ex(const unsigned char* string, bool set_int_ex(const unsigned char* string,