summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-03-29 23:50:07 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-03-29 23:50:07 +0000
commit4fd9038d35707104804a068af0ed1d35d467a1f2 (patch)
tree3cf81195173e1b6ac5d5e12bc308ae621d9c6621 /apps/plugins
parent0acc2c5955b2ae88ddeb318903135638256164fc (diff)
downloadrockbox-4fd9038d35707104804a068af0ed1d35d467a1f2.zip
rockbox-4fd9038d35707104804a068af0ed1d35d467a1f2.tar.gz
rockbox-4fd9038d35707104804a068af0ed1d35d467a1f2.tar.bz2
rockbox-4fd9038d35707104804a068af0ed1d35d467a1f2.tar.xz
pitch_detector: fix builds on monochrome targets, remove an unused variable
Add icons for Clip, copied from c200 icons git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25397 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/SOURCES2
-rw-r--r--apps/plugins/bitmaps/native/SOURCES2
-rw-r--r--apps/plugins/bitmaps/native/pitch_notes.128x64x1.bmpbin0 -> 10294 bytes
-rw-r--r--apps/plugins/pitch_detector.c18
4 files changed, 14 insertions, 8 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index a74b8be..88ddff5 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -39,7 +39,7 @@ crypt_firmware.c
#endif
#if (CONFIG_CODEC == SWCODEC) && defined(HAVE_RECORDING) && \
- (defined(HAVE_LINE_IN) || defined(HAVE_MIC_IN)) && defined(HAVE_LCD_COLOR)
+ (defined(HAVE_LINE_IN) || defined(HAVE_MIC_IN))
pitch_detector.c
#endif
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES
index f5d61b8..a064e16 100644
--- a/apps/plugins/bitmaps/native/SOURCES
+++ b/apps/plugins/bitmaps/native/SOURCES
@@ -863,6 +863,8 @@ pitch_notes.160x128x2.bmp
pitch_notes.132x80x16.bmp
#elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) && (LCD_DEPTH >= 2)
pitch_notes.128x96x2.bmp
+#elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 64)
+pitch_notes.128x64x1.bmp
#else
#error Pitch Detector: unsupported LCD
#endif
diff --git a/apps/plugins/bitmaps/native/pitch_notes.128x64x1.bmp b/apps/plugins/bitmaps/native/pitch_notes.128x64x1.bmp
new file mode 100644
index 0000000..b97bbb1
--- /dev/null
+++ b/apps/plugins/bitmaps/native/pitch_notes.128x64x1.bmp
Binary files differ
diff --git a/apps/plugins/pitch_detector.c b/apps/plugins/pitch_detector.c
index 5f375d1..10125c1 100644
--- a/apps/plugins/pitch_detector.c
+++ b/apps/plugins/pitch_detector.c
@@ -289,7 +289,9 @@ static const struct note_entry notes[] =
};
/* GUI */
-static unsigned back_color, front_color;
+#if LCD_DEPTH > 1
+static unsigned front_color;
+#endif
static int font_w,font_h;
static int bar_x_0;
static int lbl_x_minus_50, lbl_x_minus_20, lbl_x_0, lbl_x_20, lbl_x_50;
@@ -610,8 +612,9 @@ fixed log(fixed inp)
void print_int_xy(int x, int y, int v)
{
char temp[20];
-
+#if LCD_DEPTH > 1
rb->lcd_set_foreground(front_color);
+#endif
rb->snprintf(temp,20,"%d",v);
rb->lcd_putsxy(x,y,temp);
}
@@ -619,7 +622,9 @@ void print_int_xy(int x, int y, int v)
/* Print out the frequency etc */
void print_str(char* s)
{
+#if LCD_DEPTH > 1
rb->lcd_set_foreground(front_color);
+#endif
rb->lcd_putsxy(0, HZ_Y, s);
}
@@ -630,7 +635,9 @@ void print_char_xy(int x, int y, char c)
temp[0]=c;
temp[1]=0;
+#if LCD_DEPTH > 1
rb->lcd_set_foreground(front_color);
+#endif
rb->lcd_putsxy(x, y, temp);
}
@@ -674,8 +681,6 @@ void draw_bar(fixed wrong_by_cents)
rb->lcd_set_foreground(LCD_RGBPACK(255,255,255)); /* Color screens */
#elif LCD_DEPTH > 1
rb->lcd_set_foreground(LCD_BLACK); /* Greyscale screens */
-#else
- rb->lcd_set_foreground(LCD_BLACK); /* Black and white screens */
#endif
rb->lcd_hline(0,LCD_WIDTH-1, BAR_HLINE_Y);
@@ -700,8 +705,6 @@ void draw_bar(fixed wrong_by_cents)
rb->lcd_set_foreground(LCD_RGBPACK(255,0,0)); /* Color screens */
#elif LCD_DEPTH > 1
rb->lcd_set_foreground(LCD_DARKGRAY); /* Greyscale screens */
-#else
- rb->lcd_set_foreground(LCD_BLACK); /* Black and white screens */
#endif
if (fp_gt(wrong_by_cents, FP_ZERO))
@@ -1109,8 +1112,9 @@ void init_everything(void)
rb->pcm_init_recording();
/* GUI */
- back_color = rb->lcd_get_background();
+#if LCD_DEPTH > 1
front_color = rb->lcd_get_foreground();
+#endif
rb->lcd_getstringsize("X", &font_w, &font_h);
bar_x_0 = LCD_WIDTH / 2;