1
0
Fork 0
forked from len0rd/rockbox

Quick hack to clear screen before updating

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@145 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2002-04-19 12:55:12 +00:00
parent 6dd637f44c
commit f9429cc11b

View file

@ -39,29 +39,33 @@
#include "lcd-x11.h" #include "lcd-x11.h"
extern unsigned char display[LCD_WIDTH][LCD_HEIGHT/8]; extern unsigned char display[LCD_WIDTH][LCD_HEIGHT/8];
extern void screen_resized(int width, int height);
extern Display *dpy;
void lcd_update (void) void lcd_update (void)
{ {
int x, y; int x, y;
int p=0; int p=0;
int bit; int bit;
XPoint points[LCD_WIDTH * LCD_HEIGHT]; XPoint points[LCD_WIDTH * LCD_HEIGHT];
for(y=0; y<LCD_HEIGHT; y+=8) { screen_resized(LCD_WIDTH, LCD_HEIGHT);
for(x=0; x<LCD_WIDTH; x++) {
if(display[x][y/8]) { for(y=0; y<LCD_HEIGHT; y+=8) {
/* one or more bits/pixels are set */ for(x=0; x<LCD_WIDTH; x++) {
for(bit=0; bit<8; bit++) { if(display[x][y/8]) {
if(display[x][y/8]&(1<<bit)) { /* one or more bits/pixels are set */
points[p].x = x + MARGIN_X; for(bit=0; bit<8; bit++) {
points[p].y = y+bit + MARGIN_Y; if(display[x][y/8]&(1<<bit)) {
p++; /* increase the point counter */ points[p].x = x + MARGIN_X;
} points[p].y = y+bit + MARGIN_Y;
p++; /* increase the point counter */
}
}
}
} }
}
} }
} drawdots(&points[0], p);
drawdots(&points[0], p); fprintf(stderr, "lcd_update: Draws %d pixels\n", p);
fprintf(stderr, "lcd_update: Draws %d pixels\n", p); XSync(dpy,False);
} }