summaryrefslogtreecommitdiff
path: root/uisimulator/x11/lcd-x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/x11/lcd-x11.c')
-rw-r--r--uisimulator/x11/lcd-x11.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/uisimulator/x11/lcd-x11.c b/uisimulator/x11/lcd-x11.c
index 96ce800c8f..e1d1953d54 100644
--- a/uisimulator/x11/lcd-x11.c
+++ b/uisimulator/x11/lcd-x11.c
@@ -38,11 +38,11 @@
38 38
39#include "lcd-x11.h" 39#include "lcd-x11.h"
40 40
41extern unsigned char display[LCD_WIDTH][LCD_HEIGHT/8]; 41extern unsigned char lcd_framebuffer[LCD_WIDTH][LCD_HEIGHT/8];
42extern void screen_resized(int width, int height); 42extern void screen_resized(int width, int height);
43extern Display *dpy; 43extern Display *dpy;
44 44
45unsigned char display_copy[LCD_WIDTH][LCD_HEIGHT/8]; 45unsigned char lcd_framebuffer_copy[LCD_WIDTH][LCD_HEIGHT/8];
46 46
47/* this is in uibasic.c */ 47/* this is in uibasic.c */
48extern void drawdots(int color, XPoint *points, int count); 48extern void drawdots(int color, XPoint *points, int count);
@@ -61,10 +61,10 @@ void lcd_update (void)
61 61
62 for(y=0; y<LCD_HEIGHT; y+=8) { 62 for(y=0; y<LCD_HEIGHT; y+=8) {
63 for(x=0; x<LCD_WIDTH; x++) { 63 for(x=0; x<LCD_WIDTH; x++) {
64 if(display[x][y/8]) { 64 if(lcd_framebuffer[x][y/8]) {
65 /* one or more bits/pixels are set */ 65 /* one or more bits/pixels are set */
66 for(bit=0; bit<8; bit++) { 66 for(bit=0; bit<8; bit++) {
67 if(display[x][y/8]&(1<<bit)) { 67 if(lcd_framebuffer[x][y/8]&(1<<bit)) {
68 points[p].x = x + MARGIN_X; 68 points[p].x = x + MARGIN_X;
69 points[p].y = y+bit + MARGIN_Y; 69 points[p].y = y+bit + MARGIN_Y;
70 p++; /* increase the point counter */ 70 p++; /* increase the point counter */
@@ -76,13 +76,13 @@ void lcd_update (void)
76#else 76#else
77 for(y=0; y<LCD_HEIGHT; y+=8) { 77 for(y=0; y<LCD_HEIGHT; y+=8) {
78 for(x=0; x<LCD_WIDTH; x++) { 78 for(x=0; x<LCD_WIDTH; x++) {
79 if(display[x][y/8] || display_copy[x][y/8]) { 79 if(lcd_framebuffer[x][y/8] || lcd_framebuffer_copy[x][y/8]) {
80 /* one or more bits/pixels are changed */ 80 /* one or more bits/pixels are changed */
81 unsigned char diff = 81 unsigned char diff =
82 display[x][y/8] ^ display_copy[x][y/8]; 82 lcd_framebuffer[x][y/8] ^ lcd_framebuffer_copy[x][y/8];
83 83
84 for(bit=0; bit<8; bit++) { 84 for(bit=0; bit<8; bit++) {
85 if(display[x][y/8]&(1<<bit)) { 85 if(lcd_framebuffer[x][y/8]&(1<<bit)) {
86 /* set a dot */ 86 /* set a dot */
87 points[p].x = x + MARGIN_X; 87 points[p].x = x + MARGIN_X;
88 points[p].y = y+bit + MARGIN_Y; 88 points[p].y = y+bit + MARGIN_Y;
@@ -100,7 +100,7 @@ void lcd_update (void)
100 } 100 }
101 101
102 /* copy a huge block */ 102 /* copy a huge block */
103 memcpy(display_copy, display, sizeof(display)); 103 memcpy(lcd_framebuffer_copy, lcd_framebuffer, sizeof(lcd_framebuffer));
104 104
105#endif 105#endif
106 106