diff options
-rw-r--r-- | uisimulator/x11/Makefile | 14 | ||||
-rw-r--r-- | uisimulator/x11/atoi.h | 2 | ||||
-rw-r--r-- | uisimulator/x11/kernel.h | 2 | ||||
-rw-r--r-- | uisimulator/x11/lcd-x11.c | 7 | ||||
-rw-r--r-- | uisimulator/x11/sprintf.h | 5 | ||||
-rw-r--r-- | uisimulator/x11/timefuncs.h | 2 |
6 files changed, 24 insertions, 8 deletions
diff --git a/uisimulator/x11/Makefile b/uisimulator/x11/Makefile index 5fc83bfcaa..392e4c3595 100644 --- a/uisimulator/x11/Makefile +++ b/uisimulator/x11/Makefile | |||
@@ -32,7 +32,6 @@ endif | |||
32 | PREVAPPDIR= .. | 32 | PREVAPPDIR= .. |
33 | FIRMWAREDIR = ../../firmware | 33 | FIRMWAREDIR = ../../firmware |
34 | DRIVERS = $(FIRMWAREDIR)/drivers | 34 | DRIVERS = $(FIRMWAREDIR)/drivers |
35 | COMMON = $(FIRMWAREDIR)/common | ||
36 | LIBMADDIR = $(PREVAPPDIR)/common/libmad | 35 | LIBMADDIR = $(PREVAPPDIR)/common/libmad |
37 | TOOLSDIR = ../../tools | 36 | TOOLSDIR = ../../tools |
38 | DOCSDIR = ../../docs | 37 | DOCSDIR = ../../docs |
@@ -53,11 +52,12 @@ $(KEYPAD) $(DISPLAY) $(EXTRA_DEFINES) $(RTC) | |||
53 | LDFLAGS = -lX11 -lm -lXt -lXmu -lnsl | 52 | LDFLAGS = -lX11 -lm -lXt -lXmu -lnsl |
54 | 53 | ||
55 | # Use this for simulator-only files | 54 | # Use this for simulator-only files |
56 | INCLUDES = -I. -I$(DRIVERS) -I$(COMMON) -I$(FIRMWAREDIR) -I$(APPDIR) -I$(MACHINEDIR) -I../common -I$(OBJDIR) | 55 | INCLUDES = -I. -I$(DRIVERS) -I$(FIRMWAREDIR)/export -I$(APPDIR) \ |
57 | SRCDIRS = . $(DRIVERS) $(COMMON) $(FIRMWAREDIR) $(APPDIR) $(MACHINEDIR) | 56 | -I$(MACHINEDIR) -I../common -I$(OBJDIR) |
57 | SRCDIRS = . $(DRIVERS) $(FIRMWAREDIR)/export $(APPDIR) $(MACHINEDIR) | ||
58 | 58 | ||
59 | # The true Rockbox Applications should use this include path: | 59 | # The true Rockbox Applications should use this include path: |
60 | APPINCLUDES = -I$(FIRMWAREDIR)/include $(INCLUDES) | 60 | APPINCLUDES = $(INCLUDES) |
61 | 61 | ||
62 | LIBS = -lpthread | 62 | LIBS = -lpthread |
63 | 63 | ||
@@ -85,8 +85,8 @@ ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP) | |||
85 | else | 85 | else |
86 | LCDSRSC = lcd-playersim.c lcd-player.c font-player.c lcd-player-charset.c | 86 | LCDSRSC = lcd-playersim.c lcd-player.c font-player.c lcd-player-charset.c |
87 | endif | 87 | endif |
88 | FIRMSRCS = $(LCDSRSC) sprintf.c id3.c debug.c usb.c mpeg.c power.c\ | 88 | FIRMSRCS = $(LCDSRSC) id3.c debug.c usb.c mpeg.c power.c\ |
89 | powermgmt.c panic.c ctype.c | 89 | powermgmt.c panic.c |
90 | 90 | ||
91 | APPS = main.c tree.c menu.c credits.c main_menu.c language.c\ | 91 | APPS = main.c tree.c menu.c credits.c main_menu.c language.c\ |
92 | playlist.c wps.c wps-display.c settings.c status.c icons.c\ | 92 | playlist.c wps.c wps-display.c settings.c status.c icons.c\ |
@@ -284,7 +284,7 @@ $(OBJDIR)/ctype.o: $(COMMON)/ctype.c | |||
284 | $(CC) $(CFLAGS) $(APPINCLUDES) -c $< -o $@ | 284 | $(CC) $(CFLAGS) $(APPINCLUDES) -c $< -o $@ |
285 | 285 | ||
286 | $(OBJDIR)/stubs.o: ../common/stubs.c | 286 | $(OBJDIR)/stubs.o: ../common/stubs.c |
287 | $(CC) $(CFLAGS) -c $< -o $@ | 287 | $(CC) $(APPCFLAGS) -c $< -o $@ |
288 | 288 | ||
289 | $(OBJDIR)/sim_icons.o: ../common/sim_icons.c | 289 | $(OBJDIR)/sim_icons.o: ../common/sim_icons.c |
290 | $(CC) $(CFLAGS) -c $< -o $@ | 290 | $(CC) $(CFLAGS) -c $< -o $@ |
diff --git a/uisimulator/x11/atoi.h b/uisimulator/x11/atoi.h new file mode 100644 index 0000000000..74474f110c --- /dev/null +++ b/uisimulator/x11/atoi.h | |||
@@ -0,0 +1,2 @@ | |||
1 | |||
2 | int atoi(const char *); | ||
diff --git a/uisimulator/x11/kernel.h b/uisimulator/x11/kernel.h index 2facf239ac..397a1562a1 100644 --- a/uisimulator/x11/kernel.h +++ b/uisimulator/x11/kernel.h | |||
@@ -17,7 +17,7 @@ | |||
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | 19 | ||
20 | #include "../../firmware/include/kernel.h" | 20 | #include "../../firmware/export/kernel.h" |
21 | 21 | ||
22 | #define sleep(x) x11_sleep(x) | 22 | #define sleep(x) x11_sleep(x) |
23 | 23 | ||
diff --git a/uisimulator/x11/lcd-x11.c b/uisimulator/x11/lcd-x11.c index 20e4c6d3a2..0d47160b23 100644 --- a/uisimulator/x11/lcd-x11.c +++ b/uisimulator/x11/lcd-x11.c | |||
@@ -46,6 +46,8 @@ extern Display *dpy; | |||
46 | #ifdef HAVE_LCD_BITMAP | 46 | #ifdef HAVE_LCD_BITMAP |
47 | unsigned char lcd_framebuffer_copy[LCD_WIDTH][LCD_HEIGHT/8]; | 47 | unsigned char lcd_framebuffer_copy[LCD_WIDTH][LCD_HEIGHT/8]; |
48 | 48 | ||
49 | static int counter; | ||
50 | |||
49 | void lcd_update (void) | 51 | void lcd_update (void) |
50 | { | 52 | { |
51 | int x, y; | 53 | int x, y; |
@@ -55,6 +57,8 @@ void lcd_update (void) | |||
55 | int cp=0; | 57 | int cp=0; |
56 | struct coordinate clearpoints[LCD_WIDTH * LCD_HEIGHT]; | 58 | struct coordinate clearpoints[LCD_WIDTH * LCD_HEIGHT]; |
57 | 59 | ||
60 | fprintf(stderr, "%04d: lcd_update()\n", counter++); | ||
61 | |||
58 | for(y=0; y<LCD_HEIGHT; y+=8) { | 62 | for(y=0; y<LCD_HEIGHT; y+=8) { |
59 | for(x=0; x<LCD_WIDTH; x++) { | 63 | for(x=0; x<LCD_WIDTH; x++) { |
60 | if(lcd_framebuffer[x][y/8] || lcd_framebuffer_copy[x][y/8]) { | 64 | if(lcd_framebuffer[x][y/8] || lcd_framebuffer_copy[x][y/8]) { |
@@ -104,6 +108,9 @@ void lcd_update_rect(int x_start, int y_start, | |||
104 | struct coordinate points[LCD_WIDTH * LCD_HEIGHT]; | 108 | struct coordinate points[LCD_WIDTH * LCD_HEIGHT]; |
105 | struct coordinate clearpoints[LCD_WIDTH * LCD_HEIGHT]; | 109 | struct coordinate clearpoints[LCD_WIDTH * LCD_HEIGHT]; |
106 | 110 | ||
111 | fprintf(stderr, "%04d: lcd_update_rect(%d, %d, %d, %d)\n", | ||
112 | counter++, x_start, y_start, width, height); | ||
113 | |||
107 | /* The Y coordinates have to work on even 8 pixel rows */ | 114 | /* The Y coordinates have to work on even 8 pixel rows */ |
108 | ymax = (yline + height)/8; | 115 | ymax = (yline + height)/8; |
109 | yline /= 8; | 116 | yline /= 8; |
diff --git a/uisimulator/x11/sprintf.h b/uisimulator/x11/sprintf.h new file mode 100644 index 0000000000..16c42333a3 --- /dev/null +++ b/uisimulator/x11/sprintf.h | |||
@@ -0,0 +1,5 @@ | |||
1 | #include <stdarg.h> | ||
2 | #include <stdio.h> | ||
3 | |||
4 | int snprintf (char *buf, size_t size, const char *fmt, ...); | ||
5 | |||
diff --git a/uisimulator/x11/timefuncs.h b/uisimulator/x11/timefuncs.h new file mode 100644 index 0000000000..c2dcf3c888 --- /dev/null +++ b/uisimulator/x11/timefuncs.h | |||
@@ -0,0 +1,2 @@ | |||
1 | |||
2 | /* struct tm defined */ | ||