summaryrefslogtreecommitdiff
path: root/apps/plugins/fft
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2010-06-02 08:59:37 +0000
committerMichael Sevakis <jethead71@rockbox.org>2010-06-02 08:59:37 +0000
commitff2d224ae7b15a7e651f57211605c69dbb946ce8 (patch)
tree13c20ce4691f04e995fd99cb29f3c618c8e7c797 /apps/plugins/fft
parent30e2f42c82c6c558497aceb5ab0bea24ffeffa3a (diff)
FFT Plugin: Should use scale_factor, not LCD_WIDTH/HEIGHT to break the spectrogram loop.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26471 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/fft')
-rw-r--r--apps/plugins/fft/fft.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/fft/fft.c b/apps/plugins/fft/fft.c
index 2b9e541f3e..d6a8f016b3 100644
--- a/apps/plugins/fft/fft.c
+++ b/apps/plugins/fft/fft.c
@@ -1054,7 +1054,7 @@ void draw_spectrogram_vertical(void)
lcd_(drawpixel)(graph_settings.spectrogram_pos,
scale_factor-1 - y);
- if(++y >= LCD_HEIGHT)
+ if(++y >= scale_factor)
break;
bins_acc -= ARRAYLEN_PLOT;
@@ -1107,7 +1107,7 @@ void draw_spectrogram_horizontal(void)
lcd_(set_foreground)(SPECTROGRAPH_PALETTE(index));
lcd_(drawpixel)(x, graph_settings.spectrogram_pos);
- if(++x >= LCD_WIDTH)
+ if(++x >= scale_factor)
break;
bins_acc -= ARRAYLEN_PLOT;