summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/status.c2
-rw-r--r--firmware/drivers/lcd.c16
-rw-r--r--firmware/drivers/lcd.h4
-rw-r--r--uisimulator/x11/Makefile7
4 files changed, 23 insertions, 6 deletions
diff --git a/apps/status.c b/apps/status.c
index 59bbcfe781..7eb3a5b255 100644
--- a/apps/status.c
+++ b/apps/status.c
@@ -63,7 +63,7 @@ bool statusbar(bool state)
63 63
64void status_draw(void) 64void status_draw(void)
65{ 65{
66#if defined(HAVE_LCD_CHARCELLS) && !defined(SIMULATOR) 66#if defined(HAVE_LCD_CHARCELLS)
67 int battlevel = battery_level(); 67 int battlevel = battery_level();
68 int volume = mpeg_val2phys(SOUND_VOLUME, global_settings.volume); 68 int volume = mpeg_val2phys(SOUND_VOLUME, global_settings.volume);
69 69
diff --git a/firmware/drivers/lcd.c b/firmware/drivers/lcd.c
index 2062a1dc21..4c36ee19e3 100644
--- a/firmware/drivers/lcd.c
+++ b/firmware/drivers/lcd.c
@@ -32,6 +32,9 @@
32#include "panic.h" 32#include "panic.h"
33#endif 33#endif
34 34
35#if defined(SIMULATOR)
36#include "sim_icons.h"
37#endif
35 38
36 39
37/*** definitions ***/ 40/*** definitions ***/
@@ -492,8 +495,7 @@ void lcd_icon(int icon, bool enable)
492#if defined(SIMULATOR) && defined(HAVE_LCD_CHARCELLS) 495#if defined(SIMULATOR) && defined(HAVE_LCD_CHARCELLS)
493void lcd_icon(int icon, bool enable) 496void lcd_icon(int icon, bool enable)
494{ 497{
495 icon = icon; 498 sim_lcd_icon(icon, enable);
496 enable = enable;
497} 499}
498#endif 500#endif
499 501
@@ -648,11 +650,19 @@ void lcd_update_rect (int x_start, int y,
648 */ 650 */
649void lcd_clear_display (void) 651void lcd_clear_display (void)
650{ 652{
651 memset (lcd_framebuffer, 0, sizeof lcd_framebuffer);
652#if defined(SIMULATOR) && defined(HAVE_LCD_CHARCELLS) 653#if defined(SIMULATOR) && defined(HAVE_LCD_CHARCELLS)
654 /* Clear just the text portion of the display */
655 int x, y;
656 for (y = 8; y <= (32 + 7); ++y)
657 {
658 for (x = 0; x < LCD_WIDTH; x++)
659 CLEAR_PIXEL(x, y);
660 }
653 /* this function is being used when simulating a charcell LCD and 661 /* this function is being used when simulating a charcell LCD and
654 then we update immediately */ 662 then we update immediately */
655 lcd_update(); 663 lcd_update();
664#else
665 memset (lcd_framebuffer, 0, sizeof lcd_framebuffer);
656#endif 666#endif
657} 667}
658 668
diff --git a/firmware/drivers/lcd.h b/firmware/drivers/lcd.h
index 4aab039f97..b99fa54389 100644
--- a/firmware/drivers/lcd.h
+++ b/firmware/drivers/lcd.h
@@ -46,6 +46,10 @@ extern void lcd_update_rect(int x, int y, int width, int height);
46 #define lcd_update() 46 #define lcd_update()
47#endif 47#endif
48 48
49#if defined(SIMULATOR)
50#include "sim_icons.h"
51#endif
52
49#ifdef HAVE_LCD_CHARCELLS 53#ifdef HAVE_LCD_CHARCELLS
50 54
51/* Icon definitions for lcd_icon() */ 55/* Icon definitions for lcd_icon() */
diff --git a/uisimulator/x11/Makefile b/uisimulator/x11/Makefile
index cbb8aa9886..c381b915b2 100644
--- a/uisimulator/x11/Makefile
+++ b/uisimulator/x11/Makefile
@@ -48,7 +48,7 @@ $(KEYPAD) $(DISPLAY) $(EXTRA_DEFINES)
48LDFLAGS = -lX11 -lm -lXt -lXmu -lnsl 48LDFLAGS = -lX11 -lm -lXt -lXmu -lnsl
49 49
50# Use this for simulator-only files 50# Use this for simulator-only files
51INCLUDES = -I. -I$(DRIVERS) -I$(COMMON) -I$(FIRMWAREDIR) -I$(APPDIR) -I$(RECDIR) 51INCLUDES = -I. -I$(DRIVERS) -I$(COMMON) -I$(FIRMWAREDIR) -I$(APPDIR) -I$(RECDIR) -I../common
52SRCDIRS = . $(DRIVERS) $(COMMON) $(FIRMWAREDIR) $(APPDIR) $(RECDIR) 52SRCDIRS = . $(DRIVERS) $(COMMON) $(FIRMWAREDIR) $(APPDIR) $(RECDIR)
53 53
54# The true Rockbox Applications should use this include path: 54# The true Rockbox Applications should use this include path:
@@ -93,7 +93,7 @@ ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP)
93endif 93endif
94 94
95SRCS = screenhack.c uibasic.c resources.c visual.c lcd-x11.c stubs.c \ 95SRCS = screenhack.c uibasic.c resources.c visual.c lcd-x11.c stubs.c \
96 button-x11.c io.c thread.c $(APPS) $(MENUS) $(FIRMSRCS) 96 button-x11.c io.c thread.c sim_icons.c $(APPS) $(MENUS) $(FIRMSRCS)
97 97
98ifdef MPEG_PLAY 98ifdef MPEG_PLAY
99 SRCS += mpegplay.c oss_sound.c bit.c decoder.c fixed.c frame.c huffman.c layer12.c layer3.c stream.c synth.c timer.c version.c 99 SRCS += mpegplay.c oss_sound.c bit.c decoder.c fixed.c frame.c huffman.c layer12.c layer3.c stream.c synth.c timer.c version.c
@@ -244,6 +244,9 @@ $(OBJDIR)/sprintf.o: $(COMMON)/sprintf.c
244$(OBJDIR)/stubs.o: ../common/stubs.c 244$(OBJDIR)/stubs.o: ../common/stubs.c
245 $(CC) $(CFLAGS) -c $< -o $@ 245 $(CC) $(CFLAGS) -c $< -o $@
246 246
247$(OBJDIR)/sim_icons.o: ../common/sim_icons.c
248 $(CC) $(CFLAGS) -c $< -o $@
249
247$(OBJDIR)/usb.o: $(FIRMWAREDIR)/usb.c 250$(OBJDIR)/usb.o: $(FIRMWAREDIR)/usb.c
248 $(CC) $(CFLAGS) -c $< -o $@ 251 $(CC) $(CFLAGS) -c $< -o $@
249 252