summaryrefslogtreecommitdiff
path: root/uisimulator
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/x11/Makefile14
-rw-r--r--uisimulator/x11/atoi.h2
-rw-r--r--uisimulator/x11/kernel.h2
-rw-r--r--uisimulator/x11/lcd-x11.c7
-rw-r--r--uisimulator/x11/sprintf.h5
-rw-r--r--uisimulator/x11/timefuncs.h2
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
PREVAPPDIR= ..
FIRMWAREDIR = ../../firmware
DRIVERS = $(FIRMWAREDIR)/drivers
-COMMON = $(FIRMWAREDIR)/common
LIBMADDIR = $(PREVAPPDIR)/common/libmad
TOOLSDIR = ../../tools
DOCSDIR = ../../docs
@@ -53,11 +52,12 @@ $(KEYPAD) $(DISPLAY) $(EXTRA_DEFINES) $(RTC)
LDFLAGS = -lX11 -lm -lXt -lXmu -lnsl
# Use this for simulator-only files
-INCLUDES = -I. -I$(DRIVERS) -I$(COMMON) -I$(FIRMWAREDIR) -I$(APPDIR) -I$(MACHINEDIR) -I../common -I$(OBJDIR)
-SRCDIRS = . $(DRIVERS) $(COMMON) $(FIRMWAREDIR) $(APPDIR) $(MACHINEDIR)
+INCLUDES = -I. -I$(DRIVERS) -I$(FIRMWAREDIR)/export -I$(APPDIR) \
+-I$(MACHINEDIR) -I../common -I$(OBJDIR)
+SRCDIRS = . $(DRIVERS) $(FIRMWAREDIR)/export $(APPDIR) $(MACHINEDIR)
# The true Rockbox Applications should use this include path:
-APPINCLUDES = -I$(FIRMWAREDIR)/include $(INCLUDES)
+APPINCLUDES = $(INCLUDES)
LIBS = -lpthread
@@ -85,8 +85,8 @@ ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP)
else
LCDSRSC = lcd-playersim.c lcd-player.c font-player.c lcd-player-charset.c
endif
-FIRMSRCS = $(LCDSRSC) sprintf.c id3.c debug.c usb.c mpeg.c power.c\
- powermgmt.c panic.c ctype.c
+FIRMSRCS = $(LCDSRSC) id3.c debug.c usb.c mpeg.c power.c\
+ powermgmt.c panic.c
APPS = main.c tree.c menu.c credits.c main_menu.c language.c\
playlist.c wps.c wps-display.c settings.c status.c icons.c\
@@ -284,7 +284,7 @@ $(OBJDIR)/ctype.o: $(COMMON)/ctype.c
$(CC) $(CFLAGS) $(APPINCLUDES) -c $< -o $@
$(OBJDIR)/stubs.o: ../common/stubs.c
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(APPCFLAGS) -c $< -o $@
$(OBJDIR)/sim_icons.o: ../common/sim_icons.c
$(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 @@
+
+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 @@
*
****************************************************************************/
-#include "../../firmware/include/kernel.h"
+#include "../../firmware/export/kernel.h"
#define sleep(x) x11_sleep(x)
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;
#ifdef HAVE_LCD_BITMAP
unsigned char lcd_framebuffer_copy[LCD_WIDTH][LCD_HEIGHT/8];
+static int counter;
+
void lcd_update (void)
{
int x, y;
@@ -55,6 +57,8 @@ void lcd_update (void)
int cp=0;
struct coordinate clearpoints[LCD_WIDTH * LCD_HEIGHT];
+ fprintf(stderr, "%04d: lcd_update()\n", counter++);
+
for(y=0; y<LCD_HEIGHT; y+=8) {
for(x=0; x<LCD_WIDTH; x++) {
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,
struct coordinate points[LCD_WIDTH * LCD_HEIGHT];
struct coordinate clearpoints[LCD_WIDTH * LCD_HEIGHT];
+ fprintf(stderr, "%04d: lcd_update_rect(%d, %d, %d, %d)\n",
+ counter++, x_start, y_start, width, height);
+
/* The Y coordinates have to work on even 8 pixel rows */
ymax = (yline + height)/8;
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 @@
+#include <stdarg.h>
+#include <stdio.h>
+
+int snprintf (char *buf, size_t size, const char *fmt, ...);
+
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 @@
+
+/* struct tm defined */