diff options
author | Peter D'Hoye <peter.dhoye@gmail.com> | 2008-06-28 20:45:21 +0000 |
---|---|---|
committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2008-06-28 20:45:21 +0000 |
commit | 205f3df7816a1eea9c812ea285d74a4f8ecfad2a (patch) | |
tree | 356be7b807a4407b7e243ec57da4d5068fe09ab1 /apps/recorder/recording.c | |
parent | 3d240f1e2a34e616c2aba22b58ea78de7f277127 (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/recorder/recording.c')
-rw-r--r-- | apps/recorder/recording.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 9251a1d609..de4a2e6805 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -1064,8 +1064,9 @@ bool recording_screen(bool no_source) screen_update = 1; screens[1].clear_display(); snprintf(buf, sizeof(buf), str(LANG_REMOTE_LCD_ON)); - screens[1].puts((screens[1].width/w - strlen(buf))/2 + 1, - screens[1].height/(h*2) + 1, buf); + screens[1].puts((screens[1].getwidth()/w - strlen(buf))/2 + + 1, + screens[1].getheight()/(h*2) + 1, buf); screens[1].update(); gui_syncsplash(0, str(LANG_REMOTE_LCD_OFF)); } @@ -1880,10 +1881,12 @@ bool recording_screen(bool no_source) /* draw the trigger status */ FOR_NB_SCREENS(i) { + /* NOTE: UGLY width setting based on height! To be fixed! */ trig_width[i] = ((vp[i].height < 64) || ((vp[i].height < 72) && (PM_HEIGHT > 1))) ? - screens[i].width - 14 * w : screens[i].width; - trig_xpos[i] = screens[i].width - trig_width[i]; + screens[i].getwidth() - 14 * w : + screens[i].getwidth(); + trig_xpos[i] = screens[i].getwidth() - trig_width[i]; trig_ypos[i] = ((vp[i].height < 72) && (PM_HEIGHT > 1)) ? h*2 : h*(1 + filename_offset[i] + PM_HEIGHT + |