From 9c3e21da85b2d2c9e1f6912a549573fba7e4824a Mon Sep 17 00:00:00 2001 From: jethead71 Date: Fri, 11 Jan 2008 17:43:07 +0000 Subject: [PATCH] Make set_option correctly return USB connect status. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16055 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/option_select.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index bbebe2286..cb5b6eee3 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, 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, -- 2.11.4.GIT