From 4a66327583a8b5f850f822698582bf651b78da6e Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Tue, 3 Dec 2002 22:49:48 +0000 Subject: Some simulator corrections git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2919 a1c6a512-1295-4272-9138-f99709370657 --- apps/sleeptimer.c | 2 +- uisimulator/common/stubs.c | 11 +++++++++++ uisimulator/x11/Makefile | 5 ++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/apps/sleeptimer.c b/apps/sleeptimer.c index c846e08486..cf4dd90bcb 100644 --- a/apps/sleeptimer.c +++ b/apps/sleeptimer.c @@ -49,13 +49,13 @@ bool sleeptimer_screen(void) bool done = false; char buf[32]; int oldtime, newtime; + int amount = 0; #ifdef HAVE_LCD_BITMAP lcd_setfont(FONT_UI); lcd_getstringsize("M", &w, &h); lcd_setmargins(w, 8); #endif - int amount = 0; while(!done) { diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c index 9b628828ae..18aadf44d7 100644 --- a/uisimulator/common/stubs.c +++ b/uisimulator/common/stubs.c @@ -179,6 +179,17 @@ void mpeg_set_pitch(int pitch) (void)pitch; } +static int sleeptime; +void set_sleep_timer(int seconds) +{ + sleeptime = seconds; +} + +int get_sleep_timer(void) +{ + return sleeptime; +} + #ifdef HAVE_LCD_CHARCELLS void lcd_clearrect (int x, int y, int nx, int ny) { diff --git a/uisimulator/x11/Makefile b/uisimulator/x11/Makefile index 5a22f83c8f..ea511474a6 100644 --- a/uisimulator/x11/Makefile +++ b/uisimulator/x11/Makefile @@ -90,7 +90,7 @@ FIRMSRCS = $(LCDSRSC) sprintf.c id3.c debug.c usb.c mpeg.c power.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\ - screens.c peakmeter.c viewer.c + screens.c peakmeter.c viewer.c sleeptimer.c MENUS = games_menu.c demo_menu.c settings_menu.c sound_menu.c @@ -215,6 +215,9 @@ $(OBJDIR)/main.o: $(APPDIR)/main.c $(OBJDIR)/wps.o: $(APPDIR)/wps.c $(CC) $(APPCFLAGS) -c $< -o $@ +$(OBJDIR)/sleeptimer.o: $(APPDIR)/sleeptimer.c + $(CC) $(APPCFLAGS) -c $< -o $@ + $(OBJDIR)/viewer.o: $(APPDIR)/viewer.c $(CC) $(APPCFLAGS) -c $< -o $@ -- cgit v1.2.3