diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-05-20 08:26:27 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-05-20 08:26:27 +0000 |
| commit | b85817a5ba0ffe3bab748d1623799d407bd36731 (patch) | |
| tree | 95eaeee7337596aced6c552e3210cc3d758bbd2b /apps/plugins | |
| parent | 1062a17992d50cc362a0b7662bae75342fb69037 (diff) | |
| download | rockbox-b85817a5ba0ffe3bab748d1623799d407bd36731.zip rockbox-b85817a5ba0ffe3bab748d1623799d407bd36731.tar.gz rockbox-b85817a5ba0ffe3bab748d1623799d407bd36731.tar.bz2 rockbox-b85817a5ba0ffe3bab748d1623799d407bd36731.tar.xz | |
Update some comments in menu.h to be hopefully more helpful.
Fix all the wrong usage of rb->do_menu() (my fault, sorry)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13439 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/chessbox/chessbox.c | 3 | ||||
| -rw-r--r-- | apps/plugins/chopper.c | 3 | ||||
| -rw-r--r-- | apps/plugins/dice.c | 3 | ||||
| -rw-r--r-- | apps/plugins/disktidy.c | 3 | ||||
| -rw-r--r-- | apps/plugins/minesweeper.c | 3 | ||||
| -rw-r--r-- | apps/plugins/snake.c | 3 | ||||
| -rw-r--r-- | apps/plugins/star.c | 3 | ||||
| -rw-r--r-- | apps/plugins/test_codec.c | 4 | ||||
| -rw-r--r-- | apps/plugins/wavrecord.c | 5 | ||||
| -rw-r--r-- | apps/plugins/wormlet.c | 4 |
10 files changed, 12 insertions, 22 deletions
diff --git a/apps/plugins/chessbox/chessbox.c b/apps/plugins/chessbox/chessbox.c index f2ae95b..9f9e109 100644 --- a/apps/plugins/chessbox/chessbox.c +++ b/apps/plugins/chessbox/chessbox.c @@ -528,8 +528,7 @@ static int cb_menu(void) while(!menu_quit) { - selection = rb->do_menu(&menu, &selection); - switch(selection) + switch(rb->do_menu(&menu, &selection)) { case 0: menu_quit = true; diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c index 89f6e3d..26e70d3 100644 --- a/apps/plugins/chopper.c +++ b/apps/plugins/chopper.c @@ -647,8 +647,7 @@ static int chopMenu(int menunum) rb->lcd_clear_display(); while (!menu_quit) { - result=rb->do_menu(&menu,&result); - switch (result) + switch(rb->do_menu(&menu, &result)) { case 0: /* Start New Game */ menu_quit=true; diff --git a/apps/plugins/dice.c b/apps/plugins/dice.c index 1113654..0875248 100644 --- a/apps/plugins/dice.c +++ b/apps/plugins/dice.c @@ -235,8 +235,7 @@ static bool dice_menu(int *num_dice, int *side_index) { }; while (!menu_quit) { - selection = rb->do_menu(&menu, &selection); - switch(selection) + switch(rb->do_menu(&menu, &selection)) { case 0: menu_quit = true; diff --git a/apps/plugins/disktidy.c b/apps/plugins/disktidy.c index da2e76f..4340770 100644 --- a/apps/plugins/disktidy.c +++ b/apps/plugins/disktidy.c @@ -355,8 +355,7 @@ int tidy_lcd_menu(void) while (!menu_quit) { - selection = rb->do_menu(&menu,&selection); - switch(selection) + switch(rb->do_menu(&menu, &selection)) { case 0: diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c index 9dc983e..31d6995 100644 --- a/apps/plugins/minesweeper.c +++ b/apps/plugins/minesweeper.c @@ -410,8 +410,7 @@ enum minesweeper_status menu( void ) #endif while (!menu_quit) { - selection=rb->do_menu(&menu,&selection); - switch(selection) + switch(rb->do_menu(&menu, &selection)) { case 0: result = MINESWEEPER_WIN; /* start playing */ diff --git a/apps/plugins/snake.c b/apps/plugins/snake.c index fa357a8..6acbb80 100644 --- a/apps/plugins/snake.c +++ b/apps/plugins/snake.c @@ -342,8 +342,7 @@ void game_init(void) { "Quit"); while (!menu_quit) { - selection = rb->do_menu(&menu, &selection); - switch(selection) + switch(rb->do_menu(&menu, &selection)) { case 0: menu_quit = true; /* start playing */ diff --git a/apps/plugins/star.c b/apps/plugins/star.c index 56cbe8c..2e27fd2 100644 --- a/apps/plugins/star.c +++ b/apps/plugins/star.c @@ -876,8 +876,7 @@ static int star_menu(void) while(!menu_quit) { - selection = rb->do_menu(&menu, &selection); - switch(selection) + switch(rb->do_menu(&menu, &selection)) { case 0: menu_quit = true; diff --git a/apps/plugins/test_codec.c b/apps/plugins/test_codec.c index 748b071..9f452de 100644 --- a/apps/plugins/test_codec.c +++ b/apps/plugins/test_codec.c @@ -452,7 +452,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) unsigned char* codec_stack_copy; size_t codec_stack_size; struct thread_entry* codecthread_id; - int result; + int result, selection = 0; char* ch; int line = 0; @@ -529,7 +529,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->lcd_clear_display(); - result=rb->do_menu(&menu,&result); + result=rb->do_menu(&menu,&selection); if (result==0) { wavinfo.fd = -1; diff --git a/apps/plugins/wavrecord.c b/apps/plugins/wavrecord.c index 645a968..528d790 100644 --- a/apps/plugins/wavrecord.c +++ b/apps/plugins/wavrecord.c @@ -3717,9 +3717,8 @@ static int recording_menu(void) "Set channels", "Set Source", "Start recording", "Quit"); while (!done) - { - rb->do_menu(&menu, &result); - switch (result) + { + switch (rb->do_menu(&menu, &result)) { case 0: /* Set sample rate */ rb->set_option("Sample rate", &reccfg.samplerate, INT, freqs, 9, NULL); diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c index c4607cd..94cf1bd 100644 --- a/apps/plugins/wormlet.c +++ b/apps/plugins/wormlet.c @@ -2533,9 +2533,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->button_clear_queue(); while (!menu_quit) { - result = rb->do_menu(&menu, &result); - - switch(result) + switch(rb->do_menu(&menu, &result)) { case 0: rb->lcd_setfont(FONT_SYSFIXED); |