summaryrefslogtreecommitdiff
path: root/apps/plugins/oscillograph.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-06-24 22:33:21 +0000
committerJens Arnold <amiconn@rockbox.org>2005-06-24 22:33:21 +0000
commit04daef17a1d180c68888c29d11a1b9087e9ace32 (patch)
treef2d794c196981fc605880e3bbb4447edbaba5f50 /apps/plugins/oscillograph.c
parent0e935bdf01aff1e3bc66221c9a0fcc80f935c3d6 (diff)
First part of graphics api rework. Special functions, parameter handling, pixel functions, lines and filled primitives done for black & white core, main display.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6856 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/oscillograph.c')
-rw-r--r--apps/plugins/oscillograph.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/plugins/oscillograph.c b/apps/plugins/oscillograph.c
index 50e18e5a9f..1512e11389 100644
--- a/apps/plugins/oscillograph.c
+++ b/apps/plugins/oscillograph.c
@@ -65,7 +65,6 @@ static int drawMode = DRAW_MODE_FILLED;
void cleanup(void *parameter)
{
(void)parameter;
-
/* restore to default roll position.
Looks funny if you forget to do this... */
rb->lcd_roll(0);
@@ -91,13 +90,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
int lastLeft = 0;
int lastRight = 0;
int lasty = 0;
-
+
bool exit = false;
TEST_PLUGIN_API(api);
(void)parameter;
rb = api;
-
+
/* the main loop */
while (!exit) {
@@ -106,8 +105,10 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
right = rb->mas_codec_readreg(0xD) / (MAX_PEAK / (LCD_WIDTH / 2 - 2));
/* delete current line */
- rb->lcd_clearline(0, y, LCD_WIDTH-1, y);
+ rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
+ rb->lcd_drawline(0, y, LCD_WIDTH-1, y);
+ rb->lcd_set_drawmode(DRMODE_SOLID);
switch (drawMode) {
case DRAW_MODE_FILLED:
rb->lcd_drawline(LCD_WIDTH / 2 + 1 , y,