summaryrefslogtreecommitdiffstats
path: root/apps/gui/pitchscreen.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/gui/pitchscreen.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/gui/pitchscreen.c')
-rw-r--r--apps/gui/pitchscreen.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/gui/pitchscreen.c b/apps/gui/pitchscreen.c
index 2a568afc0a..c4f78f4baa 100644
--- a/apps/gui/pitchscreen.c
+++ b/apps/gui/pitchscreen.c
@@ -60,12 +60,12 @@ static void pitch_screen_draw(struct screen *display, int pitch, int pitch_mode)
display->clear_display();
- if (display->nb_lines < 4) /* very small screen, just show the pitch value */
+ if (display->getnblines() < 4) /* very small screen, just show pitch value*/
{
w = snprintf((char *)buf, sizeof(buf), "%s: %d.%d%%",str(LANG_PITCH),
pitch / 10, pitch % 10 );
- display->putsxy((display->lcdwidth-(w*display->char_width))/2,
- display->nb_lines/2,buf);
+ display->putsxy((display->lcdwidth-(w*display->getcharwidth()))/2,
+ display->getnblines()/2,buf);
}
else /* bigger screen, show everything... */
{
@@ -242,7 +242,7 @@ bool pitch_screen(void)
nudged = (new_pitch != pitch);
pitch = new_pitch;
break;
-
+
case ACTION_PS_NUDGE_LEFTOFF:
if (nudged) {
pitch = pitch_increase(pitch, PITCH_NUDGE_DELTA, false);
@@ -268,7 +268,7 @@ bool pitch_screen(void)
return 1;
break;
}
-
+
if(delta)
{
if (pitch_mode == PITCH_MODE_ABSOLUTE) {
@@ -276,10 +276,10 @@ bool pitch_screen(void)
} else {
pitch = pitch_increase_semitone(pitch, delta > 0 ? true:false);
}
-
+
delta = 0;
}
-
+
}
#if CONFIG_CODEC == SWCODEC
pcmbuf_set_low_latency(false);