1
0
Fork 0
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:
Peter D'Hoye 2008-06-28 20:45:21 +00:00
parent 3d240f1e2a
commit 205f3df781
26 changed files with 165 additions and 149 deletions

View file

@ -173,8 +173,8 @@ void jackpot_display_slot_machine(struct jackpot* game, struct screen* display)
display->putc(0, 0, '[');
#else
const struct picture* picture= &(jackpot_pictures[display->screen_type]);
int pos_x=(display->width-NB_SLOTS*(picture->width+1))/2;
int pos_y=(display->height-(picture->height))/2;
int pos_x=(display->getwidth()-NB_SLOTS*(picture->width+1))/2;
int pos_y=(display->getheight()-(picture->height))/2;
#endif /* HAVE_LCD_CHARCELLS */
for(i=0;i<NB_SLOTS;i++)
{
@ -223,9 +223,10 @@ void jackpot_info_message(struct screen* display, char* message)
int xpos, ypos;
int message_height, message_width;
display->getstringsize(message, &message_width, &message_height);
xpos=(display->width-message_width)/2;
ypos=display->height-message_height;
rb->screen_clear_area(display, 0, ypos, display->width, message_height);
xpos=(display->getwidth()-message_width)/2;
ypos=display->getheight()-message_height;
rb->screen_clear_area(display, 0, ypos, display->getwidth(),
message_height);
display->putsxy(xpos,ypos,message);
display->update();
#endif /* HAVE_LCD_CHARCELLS */