diff options
author | Nils Wallménius <nils@rockbox.org> | 2008-10-12 16:47:59 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2008-10-12 16:47:59 +0000 |
commit | 2ca30a0c745f0b50fe969fe0763816497289fa3e (patch) | |
tree | b793a4edf3ea7e55c1ba3d0ed78d20a149a6ebf5 | |
parent | da8bff107e8ed6bf63cc005bfa6c90b12c8b4dd5 (diff) | |
download | rockbox-2ca30a0c745f0b50fe969fe0763816497289fa3e.tar.gz rockbox-2ca30a0c745f0b50fe969fe0763816497289fa3e.zip |
Minor clean up, move common define to a header file and use TIME_AFTER macro
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18783 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/playlist.c | 4 | ||||
-rw-r--r-- | apps/playlist.h | 2 | ||||
-rw-r--r-- | apps/playlist_catalog.c | 1 |
3 files changed, 3 insertions, 4 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 9cbda3f991..cdcc0594c2 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -136,8 +136,6 @@ #define PLAYLIST_QUEUED 0x20000000 #define PLAYLIST_SKIPPED 0x10000000 -#define PLAYLIST_DISPLAY_COUNT 10 - struct directory_search_context { struct playlist_info* playlist; int position; @@ -2040,7 +2038,7 @@ int playlist_resume(void) for(count=0; count<nread && !exit_loop && !useraborted; count++,p++) { /* So a splash while we are loading. */ - if (current_tick - last_tick > HZ/4) + if (TIME_AFTER(current_tick, last_tick + HZ/4)) { splashf(0, str(LANG_LOADING_PERCENT), (total_read+count)*100/control_file_size, diff --git a/apps/playlist.h b/apps/playlist.h index bca98e47ae..345417a29a 100644 --- a/apps/playlist.h +++ b/apps/playlist.h @@ -32,6 +32,8 @@ #define PLAYLIST_ATTR_SKIPPED 0x04 #define PLAYLIST_MAX_CACHE 16 +#define PLAYLIST_DISPLAY_COUNT 10 + #define DEFAULT_DYNAMIC_PLAYLIST_NAME "/dynamic.m3u8" enum playlist_command { diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c index ef2c1d13d5..7daae15552 100644 --- a/apps/playlist_catalog.c +++ b/apps/playlist_catalog.c @@ -46,7 +46,6 @@ #include "talk.h" #define MAX_PLAYLISTS 400 -#define PLAYLIST_DISPLAY_COUNT 10 /* Use for recursive directory search */ struct add_track_context { |