diff options
author | Dave Chapman <dave@dchapman.com> | 2008-03-21 19:38:00 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2008-03-21 19:38:00 +0000 |
commit | d02c79c03fed154e8cdf4cbef8670221dfe922aa (patch) | |
tree | ae519730d242d0b9daadcf9daa10154beab682d5 /apps/recorder/peakmeter.c | |
parent | 1544b36966c692e20d711b920eade06487996eb6 (diff) | |
download | rockbox-d02c79c03fed154e8cdf4cbef8670221dfe922aa.tar.gz rockbox-d02c79c03fed154e8cdf4cbef8670221dfe922aa.zip |
Commit viewports-in-WPS patch (FS#8385). This adds the %V tag - see the CustomWPS page for details (shortly...). There is still some work to do - decide how to handle font references, decide how to handle conditionals. Plus checkwps is broken - I'll fix that in a separate commit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16733 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/peakmeter.c')
-rw-r--r-- | apps/recorder/peakmeter.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c index 541101cb80..fb2e465006 100644 --- a/apps/recorder/peakmeter.c +++ b/apps/recorder/peakmeter.c | |||
@@ -915,14 +915,14 @@ unsigned short peak_meter_scale_value(unsigned short val, int meterwidth) | |||
915 | void peak_meter_screen(struct screen *display, int x, int y, int height) | 915 | void peak_meter_screen(struct screen *display, int x, int y, int height) |
916 | { | 916 | { |
917 | peak_meter_draw(display, &scales[display->screen_type], x, y, | 917 | peak_meter_draw(display, &scales[display->screen_type], x, y, |
918 | display->width - x, height); | 918 | display->getwidth() - x, height); |
919 | } | 919 | } |
920 | /** | 920 | /** |
921 | * Draws a peak meter in the specified size at the specified position. | 921 | * Draws a peak meter in the specified size at the specified position. |
922 | * @param int x - The x coordinate. | 922 | * @param int x - The x coordinate. |
923 | * Make sure that 0 <= x and x + width < display->width | 923 | * Make sure that 0 <= x and x + width < display->getwidth() |
924 | * @param int y - The y coordinate. | 924 | * @param int y - The y coordinate. |
925 | * Make sure that 0 <= y and y + height < display->height | 925 | * Make sure that 0 <= y and y + height < display->getheight() |
926 | * @param int width - The width of the peak meter. Note that for display | 926 | * @param int width - The width of the peak meter. Note that for display |
927 | * of clips a 3 pixel wide area is used -> | 927 | * of clips a 3 pixel wide area is used -> |
928 | * width > 3 | 928 | * width > 3 |
@@ -1111,7 +1111,7 @@ static void peak_meter_draw(struct screen *display, struct meter_scales *scales, | |||
1111 | start_trigx = x+peak_meter_scale_value(trig_strt_threshold,meterwidth); | 1111 | start_trigx = x+peak_meter_scale_value(trig_strt_threshold,meterwidth); |
1112 | display->vline(start_trigx, ycenter - 2, ycenter); | 1112 | display->vline(start_trigx, ycenter - 2, ycenter); |
1113 | start_trigx ++; | 1113 | start_trigx ++; |
1114 | if (start_trigx < display->width ) display->drawpixel(start_trigx, ycenter - 1); | 1114 | if (start_trigx < display->getwidth() ) display->drawpixel(start_trigx, ycenter - 1); |
1115 | 1115 | ||
1116 | stop_trigx = x + peak_meter_scale_value(trig_stp_threshold,meterwidth); | 1116 | stop_trigx = x + peak_meter_scale_value(trig_stp_threshold,meterwidth); |
1117 | display->vline(stop_trigx, ycenter - 2, ycenter); | 1117 | display->vline(stop_trigx, ycenter - 2, ycenter); |