summaryrefslogtreecommitdiffstats
path: root/apps/playlist_viewer.c
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2008-09-07 20:09:11 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2008-09-07 20:09:11 +0000
commit3c1e9ca55892ae342c9efb396cd9f49f3d403a5a (patch)
tree92b4bfa29308aae41843c47350b27385fae35b11 /apps/playlist_viewer.c
parente682143af578d9643f45712f0dcbcc13e94597d4 (diff)
downloadrockbox-3c1e9ca55892ae342c9efb396cd9f49f3d403a5a.tar.gz
rockbox-3c1e9ca55892ae342c9efb396cd9f49f3d403a5a.tar.bz2
rockbox-3c1e9ca55892ae342c9efb396cd9f49f3d403a5a.zip
Change screens memebers char_width, char_height and nb_lines to functions returning a calculated value. Fixes FS #9361 because the values were calculated based on sysfont, not the user selected font.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18441 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playlist_viewer.c')
-rw-r--r--apps/playlist_viewer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c
index 62e755a53a..3b74406d37 100644
--- a/apps/playlist_viewer.c
+++ b/apps/playlist_viewer.c
@@ -58,7 +58,7 @@
/* The number of items between the selected one and the end/start of
* the buffer under which the buffer must reload */
-#define MIN_BUFFER_MARGIN (screens[0].nb_lines+1)
+#define MIN_BUFFER_MARGIN (screens[0].getnblines()+1)
/* Information about a specific track */
struct playlist_entry {
@@ -182,7 +182,7 @@ static void playlist_buffer_load_entries_screen(struct playlist_buffer * pb,
{
if(direction==FORWARD)
{
- int min_start=viewer.selected_track-2*screens[0].nb_lines;
+ int min_start=viewer.selected_track-2*screens[0].getnblines();
while(min_start<0)
min_start+=viewer.num_tracks;
min_start %= viewer.num_tracks;
@@ -190,7 +190,7 @@ static void playlist_buffer_load_entries_screen(struct playlist_buffer * pb,
}
else
{
- int max_start=viewer.selected_track+2*screens[0].nb_lines;
+ int max_start=viewer.selected_track+2*screens[0].getnblines();
max_start%=viewer.num_tracks;
playlist_buffer_load_entries(pb, max_start, BACKWARD);
}