summaryrefslogtreecommitdiff
path: root/apps/plugins/jackpot.c
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2008-06-28 20:45:21 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2008-06-28 20:45:21 +0000
commit205f3df7816a1eea9c812ea285d74a4f8ecfad2a (patch)
tree356be7b807a4407b7e243ec57da4d5068fe09ab1 /apps/plugins/jackpot.c
parent3d240f1e2a34e616c2aba22b58ea78de7f277127 (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/plugins/jackpot.c')
-rw-r--r--apps/plugins/jackpot.c11
1 files changed, 6 insertions, 5 deletions
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;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 */