From 205f3df7816a1eea9c812ea285d74a4f8ecfad2a Mon Sep 17 00:00:00 2001 From: Peter D'Hoye Date: Sat, 28 Jun 2008 20:45:21 +0000 Subject: 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 --- apps/plugins/jackpot.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'apps/plugins/jackpot.c') diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c index f4a2914116..38cd12e993 100644 --- a/apps/plugins/jackpot.c +++ b/apps/plugins/jackpot.c @@ -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;igetstringsize(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 */ -- cgit v1.2.3