diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-03-26 10:59:39 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-03-26 10:59:39 +0000 |
commit | 319d1f3406f200e08cac3d76c90d6b62dfda25e9 (patch) | |
tree | be4f8a0cb013615b1a510a5dadfc3d071447f813 /uisimulator/lcd-x11.c | |
parent | d20e6eee0e483582a40968bff25108c3ed855195 (diff) | |
download | rockbox-319d1f3406f200e08cac3d76c90d6b62dfda25e9.tar.gz rockbox-319d1f3406f200e08cac3d76c90d6b62dfda25e9.zip |
lcd_update() works for X11 now...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/lcd-x11.c')
-rw-r--r-- | uisimulator/lcd-x11.c | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/uisimulator/lcd-x11.c b/uisimulator/lcd-x11.c index efd6c9e8bd..7655765137 100644 --- a/uisimulator/lcd-x11.c +++ b/uisimulator/lcd-x11.c | |||
@@ -17,7 +17,50 @@ | |||
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | 19 | ||
20 | #include <stdio.h> | ||
21 | #include <string.h> | ||
22 | #include <stdarg.h> | ||
23 | #include <stdlib.h> | ||
24 | #include <ctype.h> | ||
25 | #include <sys/types.h> | ||
26 | #include <sys/stat.h> | ||
27 | #include <fcntl.h> | ||
28 | |||
29 | #include <errno.h> | ||
30 | #include <ctype.h> | ||
31 | #include <time.h> | ||
32 | |||
33 | #include "screenhack.h" | ||
34 | |||
20 | /* | 35 | /* |
21 | * Specific implementations for X11, using the generic LCD functions and data. | 36 | * Specific implementations for X11, using the generic LCD API and data. |
22 | */ | 37 | */ |
23 | 38 | ||
39 | #include "lcd.h" | ||
40 | |||
41 | extern unsigned char display[LCD_WIDTH/8][LCD_HEIGHT]; | ||
42 | |||
43 | void lcd_update (void) | ||
44 | { | ||
45 | int x, y; | ||
46 | int p=0; | ||
47 | int bit; | ||
48 | XPoint points[LCD_WIDTH * LCD_HEIGHT]; | ||
49 | |||
50 | for(y=0; y<LCD_HEIGHT; y+=8) { | ||
51 | for(x=0; x<LCD_WIDTH; x++) { | ||
52 | if(display[y/8][x]) { | ||
53 | /* one or more bits/pixels are set */ | ||
54 | for(bit=0; bit<8; bit++) { | ||
55 | if(display[y/8][x]&(1<<bit)) { | ||
56 | points[p].x = x; | ||
57 | points[p].y = y+bit; | ||
58 | p++; /* increase the point counter */ | ||
59 | } | ||
60 | } | ||
61 | |||
62 | } | ||
63 | } | ||
64 | } | ||
65 | drawdots(&points[0], p); | ||
66 | } | ||