diff options
author | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-07-23 23:01:20 +0000 |
---|---|---|
committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-07-23 23:01:20 +0000 |
commit | b1403ee024f81ced657261441571ee5e8bab71ce (patch) | |
tree | 3a7e1651d37bd35e801a331416654760cb61a075 /apps/settings.c | |
parent | 15d04fdb00e7f94aef49cf9a70e73c5a46e21536 (diff) | |
download | rockbox-b1403ee024f81ced657261441571ee5e8bab71ce.tar.gz rockbox-b1403ee024f81ced657261441571ee5e8bab71ce.zip |
New way of defining menus and options allows to declare them static const, which saves the code to runtime-assemble them. Rockbox just got 6 KB smaller.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4931 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/settings.c b/apps/settings.c index 4c1f8afc3b..31d9232851 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -1390,7 +1390,7 @@ bool set_int(char* string, | |||
1390 | code. */ | 1390 | code. */ |
1391 | 1391 | ||
1392 | bool set_option(char* string, void* variable, enum optiontype type, | 1392 | bool set_option(char* string, void* variable, enum optiontype type, |
1393 | struct opt_items* options, int numoptions, void (*function)(int)) | 1393 | const struct opt_items* options, int numoptions, void (*function)(int)) |
1394 | { | 1394 | { |
1395 | bool done = false; | 1395 | bool done = false; |
1396 | int button; | 1396 | int button; |
@@ -1416,7 +1416,7 @@ bool set_option(char* string, void* variable, enum optiontype type, | |||
1416 | 1416 | ||
1417 | while ( !done ) { | 1417 | while ( !done ) { |
1418 | index = type==INT ? *intvar : (int)*boolvar; | 1418 | index = type==INT ? *intvar : (int)*boolvar; |
1419 | lcd_puts(0, 1, options[index].string); | 1419 | lcd_puts(0, 1, P2STR(options[index].string)); |
1420 | if (global_settings.talk_menu && index != oldindex) | 1420 | if (global_settings.talk_menu && index != oldindex) |
1421 | { | 1421 | { |
1422 | talk_id(options[index].voice_id, false); | 1422 | talk_id(options[index].voice_id, false); |