diff options
author | Peter D'Hoye <peter.dhoye@gmail.com> | 2008-06-28 20:45:21 +0000 |
---|---|---|
committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2008-06-28 20:45:21 +0000 |
commit | 205f3df7816a1eea9c812ea285d74a4f8ecfad2a (patch) | |
tree | 356be7b807a4407b7e243ec57da4d5068fe09ab1 /apps/gui/viewport.c | |
parent | 3d240f1e2a34e616c2aba22b58ea78de7f277127 (diff) |
Remove a viewport ambiguity by changing the screens width/heigth members into lcdwidth/lcdheight. Normal usercode should always use getwidth()/getheigth() as that returns the viewport width/height. Fixes issues that would have appeared in many places when introducing viewports with sizes != lcd sizes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17857 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/viewport.c')
-rw-r--r-- | apps/gui/viewport.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index 6aad7c5b05..ef61494b71 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c @@ -48,10 +48,10 @@ int viewport_get_nb_lines(struct viewport *vp) void viewport_set_defaults(struct viewport *vp, enum screen_type screen) { vp->x = 0; - vp->width = screens[screen].width; - + vp->width = screens[screen].lcdwidth; + vp->y = gui_statusbar_height(); - vp->height = screens[screen].height - vp->y; + vp->height = screens[screen].lcdheight - vp->y; #ifdef HAVE_LCD_BITMAP vp->drawmode = DRMODE_SOLID; vp->font = FONT_UI; /* default to UI to discourage SYSFONT use */ |