mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
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:
parent
6dd637f44c
commit
f9429cc11b
1 changed files with 23 additions and 19 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue