summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-10-13 12:07:59 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-10-13 12:07:59 +0000
commitc9d1ab721870b622a3698cd9b1ee9c451fabf85a (patch)
tree96d93d3b0471ce3de628867f71a7851923ef08c5 /uisimulator
parent5fc117ea4e1aedf820a9787e33f208b489a31407 (diff)
downloadrockbox-c9d1ab721870b622a3698cd9b1ee9c451fabf85a.tar.gz
rockbox-c9d1ab721870b622a3698cd9b1ee9c451fabf85a.zip
Fixes a problem where the sim would try to start the WPS on HAVE_RTC_ALARM sims (FS#7862 with a small addition by me)
use the --alarm argument if you do want to simulate this behaviour git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15094 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/common/stubs.c4
-rw-r--r--uisimulator/sdl/uisdl.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c
index 69daa515b0..840b1421c0 100644
--- a/uisimulator/common/stubs.c
+++ b/uisimulator/common/stubs.c
@@ -169,9 +169,11 @@ bool rtc_enable_alarm(bool enable)
return enable;
}
+extern bool sim_alarm_wakeup;
bool rtc_check_alarm_started(bool release_alarm)
{
- return release_alarm;
+ (void)release_alarm;
+ return sim_alarm_wakeup;
}
bool rtc_check_alarm_flag(void)
diff --git a/uisimulator/sdl/uisdl.c b/uisimulator/sdl/uisdl.c
index d7845c5beb..9dcdbc7e26 100644
--- a/uisimulator/sdl/uisdl.c
+++ b/uisimulator/sdl/uisdl.c
@@ -54,6 +54,7 @@ SDL_TimerID tick_timer_id;
bool lcd_display_redraw = true; /* Used for player simulator */
char having_new_lcd = true; /* Used for player simulator */
+bool sim_alarm_wakeup = false;
bool debug_audio = false;
@@ -206,6 +207,9 @@ int main(int argc, char *argv[])
else
display_zoom = 2;
printf("Window zoom is %d\n", display_zoom);
+ } else if (!strcmp("--alarm", argv[x])) {
+ sim_alarm_wakeup = true;
+ printf("Simulating alarm wakeup.\n");
} else {
printf("rockboxui\n");
printf("Arguments:\n");
@@ -214,6 +218,7 @@ int main(int argc, char *argv[])
printf(" --background \t Use background image of hardware\n");
printf(" --old_lcd \t [Player] simulate old playermodel (ROM version<4.51)\n");
printf(" --zoom [VAL]\t window zoom (will disable backgrounds)\n");
+ printf(" --alarm \t Simulate a wakup-up on Alarm\n");
exit(0);
}
}