summaryrefslogtreecommitdiff
path: root/uisimulator/lcd-x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/lcd-x11.c')
-rw-r--r--uisimulator/lcd-x11.c45
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
41extern unsigned char display[LCD_WIDTH/8][LCD_HEIGHT];
42
43void 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}