mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
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
|
@ -108,8 +108,8 @@ void polygon_init(struct polygon * polygon, struct screen * display)
|
|||
int i;
|
||||
for(i=0;i<NB_POINTS;++i)
|
||||
{
|
||||
polygon->points[i].x=(rb->rand() % (display->width));
|
||||
polygon->points[i].y=(rb->rand() % (display->height));
|
||||
polygon->points[i].x=(rb->rand() % (display->getwidth()));
|
||||
polygon->points[i].y=(rb->rand() % (display->getheight()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -167,9 +167,9 @@ void polygon_update(struct polygon *polygon, struct screen * display, struct pol
|
|||
x=1;
|
||||
polygon_move->move_steps[i].x=get_new_step(step);
|
||||
}
|
||||
else if(x>=display->width)
|
||||
else if(x>=display->getwidth())
|
||||
{
|
||||
x=display->width-1;
|
||||
x=display->getwidth()-1;
|
||||
polygon_move->move_steps[i].x=get_new_step(step);
|
||||
}
|
||||
polygon->points[i].x=x;
|
||||
|
@ -182,9 +182,9 @@ void polygon_update(struct polygon *polygon, struct screen * display, struct pol
|
|||
y=1;
|
||||
polygon_move->move_steps[i].y=get_new_step(step);
|
||||
}
|
||||
else if(y>=display->height)
|
||||
else if(y>=display->getheight())
|
||||
{
|
||||
y=display->height-1;
|
||||
y=display->getheight()-1;
|
||||
polygon_move->move_steps[i].y=get_new_step(step);
|
||||
}
|
||||
polygon->points[i].y=y;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue