forked from len0rd/rockbox
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
This commit is contained in:
parent
3d240f1e2a
commit
205f3df781
26 changed files with 165 additions and 149 deletions
|
|
@ -1550,16 +1550,17 @@ bool wps_data_load(struct wps_data *wps_data,
|
|||
|
||||
/* Initialise the first (default) viewport */
|
||||
wps_data->viewports[0].vp.x = 0;
|
||||
wps_data->viewports[0].vp.width = display->width;
|
||||
wps_data->viewports[0].vp.width = display->getwidth();
|
||||
if (!global_settings.statusbar)
|
||||
{
|
||||
wps_data->viewports[0].vp.y = 0;
|
||||
wps_data->viewports[0].vp.height = display->height;
|
||||
wps_data->viewports[0].vp.height = display->getheight();
|
||||
}
|
||||
else
|
||||
{
|
||||
wps_data->viewports[0].vp.y = STATUSBAR_HEIGHT;
|
||||
wps_data->viewports[0].vp.height = display->height - STATUSBAR_HEIGHT;
|
||||
wps_data->viewports[0].vp.height = display->getheight() -
|
||||
STATUSBAR_HEIGHT;
|
||||
}
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
wps_data->viewports[0].vp.font = FONT_UI;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue