diff options
Diffstat (limited to 'apps/gui/quickscreen.c')
-rw-r--r-- | apps/gui/quickscreen.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c index 261b1ca8ac..ddc02c1103 100644 --- a/apps/gui/quickscreen.c +++ b/apps/gui/quickscreen.c | |||
@@ -200,10 +200,7 @@ static void gui_quickscreen_draw(struct gui_quickscreen *qs, | |||
200 | 200 | ||
201 | title = P2STR(ID2P(qs->items[i]->lang_id)); | 201 | title = P2STR(ID2P(qs->items[i]->lang_id)); |
202 | setting = qs->items[i]->setting; | 202 | setting = qs->items[i]->setting; |
203 | if ((qs->items[i]->flags & F_BOOL_SETTING) == F_BOOL_SETTING) | 203 | temp = option_value_as_int(qs->items[i]); |
204 | temp = *(bool*)setting?1:0; | ||
205 | else | ||
206 | temp = *(int*)setting; | ||
207 | value = option_get_valuestring((struct settings_list*)qs->items[i], | 204 | value = option_get_valuestring((struct settings_list*)qs->items[i], |
208 | buf, MAX_PATH, temp); | 205 | buf, MAX_PATH, temp); |
209 | 206 | ||
@@ -235,23 +232,13 @@ static void gui_quickscreen_draw(struct gui_quickscreen *qs, | |||
235 | display->set_viewport(NULL); | 232 | display->set_viewport(NULL); |
236 | } | 233 | } |
237 | 234 | ||
238 | static int option_value(const struct settings_list *setting) | ||
239 | { | ||
240 | if ((setting->flags & F_BOOL_SETTING) == F_BOOL_SETTING) | ||
241 | { | ||
242 | return *(bool*)setting->setting==true?1:0; | ||
243 | } | ||
244 | else | ||
245 | return *(int*)setting->setting; | ||
246 | } | ||
247 | |||
248 | static void talk_qs_option(struct settings_list *opt, bool enqueue) | 235 | static void talk_qs_option(struct settings_list *opt, bool enqueue) |
249 | { | 236 | { |
250 | if (global_settings.talk_menu) { | 237 | if (global_settings.talk_menu) { |
251 | if(!enqueue) | 238 | if(!enqueue) |
252 | talk_shutup(); | 239 | talk_shutup(); |
253 | talk_id(opt->lang_id, true); | 240 | talk_id(opt->lang_id, true); |
254 | option_talk_value(opt, option_value(opt), true); | 241 | option_talk_value(opt, option_value_as_int(opt), true); |
255 | } | 242 | } |
256 | } | 243 | } |
257 | 244 | ||