summaryrefslogtreecommitdiffstats
path: root/apps/plugins/dice.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/dice.c
parent3d240f1e2a34e616c2aba22b58ea78de7f277127 (diff)
downloadrockbox-205f3df7816a1eea9c812ea285d74a4f8ecfad2a.tar.gz
rockbox-205f3df7816a1eea9c812ea285d74a4f8ecfad2a.tar.bz2
rockbox-205f3df7816a1eea9c812ea285d74a4f8ecfad2a.zip
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/dice.c')
-rw-r--r--apps/plugins/dice.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/dice.c b/apps/plugins/dice.c
index 6f13cdd51a..086309a1b8 100644
--- a/apps/plugins/dice.c
+++ b/apps/plugins/dice.c
@@ -112,7 +112,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
void dice_init(struct dices* dice){
dice->nb_dices=INITIAL_NB_DICES;
sides_index=INITIAL_NB_SIDES;
-
+
}
void dice_roll(struct dices* dice) {
@@ -139,8 +139,8 @@ void dice_print(struct dices* dice, struct screen* display){
/* display characteristics */
int char_height, char_width;
display->getstringsize("M", &char_width, &char_height);
- int display_nb_row=display->height/char_height;
- int display_nb_col=display->width/char_width;
+ int display_nb_row=display->getheight()/char_height;
+ int display_nb_col=display->getwidth()/char_width;
int nb_dices_per_line=display_nb_col/4;/* 4 char per dice displayed*/
int nb_lines_required=dice->nb_dices/nb_dices_per_line;