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) | |
download | rockbox-205f3df7816a1eea9c812ea285d74a4f8ecfad2a.tar.gz 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/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) | |||
1064 | screen_update = 1; | 1064 | screen_update = 1; |
1065 | screens[1].clear_display(); | 1065 | screens[1].clear_display(); |
1066 | snprintf(buf, sizeof(buf), str(LANG_REMOTE_LCD_ON)); | 1066 | snprintf(buf, sizeof(buf), str(LANG_REMOTE_LCD_ON)); |
1067 | screens[1].puts((screens[1].width/w - strlen(buf))/2 + 1, | 1067 | screens[1].puts((screens[1].getwidth()/w - strlen(buf))/2 + |
1068 | screens[1].height/(h*2) + 1, buf); | 1068 | 1, |
1069 | screens[1].getheight()/(h*2) + 1, buf); | ||
1069 | screens[1].update(); | 1070 | screens[1].update(); |
1070 | gui_syncsplash(0, str(LANG_REMOTE_LCD_OFF)); | 1071 | gui_syncsplash(0, str(LANG_REMOTE_LCD_OFF)); |
1071 | } | 1072 | } |
@@ -1880,10 +1881,12 @@ bool recording_screen(bool no_source) | |||
1880 | /* draw the trigger status */ | 1881 | /* draw the trigger status */ |
1881 | FOR_NB_SCREENS(i) | 1882 | FOR_NB_SCREENS(i) |
1882 | { | 1883 | { |
1884 | /* NOTE: UGLY width setting based on height! To be fixed! */ | ||
1883 | trig_width[i] = ((vp[i].height < 64) || | 1885 | trig_width[i] = ((vp[i].height < 64) || |
1884 | ((vp[i].height < 72) && (PM_HEIGHT > 1))) ? | 1886 | ((vp[i].height < 72) && (PM_HEIGHT > 1))) ? |
1885 | screens[i].width - 14 * w : screens[i].width; | 1887 | screens[i].getwidth() - 14 * w : |
1886 | trig_xpos[i] = screens[i].width - trig_width[i]; | 1888 | screens[i].getwidth(); |
1889 | trig_xpos[i] = screens[i].getwidth() - trig_width[i]; | ||
1887 | trig_ypos[i] = ((vp[i].height < 72) && (PM_HEIGHT > 1)) ? | 1890 | trig_ypos[i] = ((vp[i].height < 72) && (PM_HEIGHT > 1)) ? |
1888 | h*2 : | 1891 | h*2 : |
1889 | h*(1 + filename_offset[i] + PM_HEIGHT + | 1892 | h*(1 + filename_offset[i] + PM_HEIGHT + |