diff options
| author | Björn Stenberg <bjorn@haxx.se> | 2002-06-17 10:36:42 +0000 |
|---|---|---|
| committer | Björn Stenberg <bjorn@haxx.se> | 2002-06-17 10:36:42 +0000 |
| commit | fc2bb6cd2086045d8261b0bf95703510a3aa1bc6 (patch) | |
| tree | 9311df0d3118b4985aa6473770a4cd873b5d5fe6 /apps/main_menu.c | |
| parent | dbf59f490e716a7cc92cbb999572c08236e4908d (diff) | |
| download | rockbox-fc2bb6cd2086045d8261b0bf95703510a3aa1bc6.zip rockbox-fc2bb6cd2086045d8261b0bf95703510a3aa1bc6.tar.gz rockbox-fc2bb6cd2086045d8261b0bf95703510a3aa1bc6.tar.bz2 rockbox-fc2bb6cd2086045d8261b0bf95703510a3aa1bc6.tar.xz | |
Made playlist shuffle an option instead of an action
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1031 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/main_menu.c')
| -rw-r--r-- | apps/main_menu.c | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/apps/main_menu.c b/apps/main_menu.c index 25ab12e..fb286ec 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c @@ -169,18 +169,29 @@ void scroll_speed(void) void shuffle(void) { + bool done = false; + lcd_clear_display(); - if(playlist.amount) { - lcd_puts(0,0,"Shuffling..."); + lcd_puts(0,0,"[Shuffle]"); + + while ( !done ) { + lcd_puts(0,1,playlist_shuffle ? "on " : "off"); lcd_update(); - randomise_playlist( &playlist, current_tick ); - lcd_puts(0,1,"Done."); - } - else { - lcd_puts(0,0,"No playlist"); + + switch ( button_get(true) ) { +#ifdef HAVE_RECORDER_KEYPAD + case BUTTON_LEFT: +#else + case BUTTON_STOP: +#endif + done = true; + break; + + default: + playlist_shuffle = !playlist_shuffle; + break; + } } - lcd_update(); - sleep(HZ); } void main_menu(void) |