summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-01-11 17:43:07 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-01-11 17:43:07 +0000
commitc4ebcbeaf496c3b50be01da9a2a9ce6eefef9c2c (patch)
treef3cd9b13a269bba1caaf3e9c7e20577c0c5af974
parenta8b4c2d73aecf839ac0684f4b988e3c1d42f96ff (diff)
downloadrockbox-c4ebcbeaf496c3b50be01da9a2a9ce6eefef9c2c.tar.gz
rockbox-c4ebcbeaf496c3b50be01da9a2a9ce6eefef9c2c.zip
Make set_option correctly return USB connect status.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16055 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/option_select.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c
index bbebe22867..cb5b6eee36 100644
--- a/apps/gui/option_select.c
+++ b/apps/gui/option_select.c
@@ -566,12 +566,15 @@ bool set_option(const char* string, void* variable, enum optiontype type,
566 temp = *(bool*)variable? 1: 0; 566 temp = *(bool*)variable? 1: 0;
567 else 567 else
568 temp = *(int*)variable; 568 temp = *(int*)variable;
569 option_screen(&item, false, NULL); 569 if (!option_screen(&item, false, NULL))
570 if (type == BOOL) 570 {
571 *(bool*)variable = (temp == 1? true: false); 571 if (type == BOOL)
572 else 572 *(bool*)variable = (temp == 1? true: false);
573 *(int*)variable = temp; 573 else
574 return false; 574 *(int*)variable = temp;
575 return false;
576 }
577 return true;
575} 578}
576 579
577bool set_int_ex(const unsigned char* string, 580bool set_int_ex(const unsigned char* string,