summaryrefslogtreecommitdiffstats
path: root/uisimulator/common
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/common')
-rw-r--r--uisimulator/common/sim_tasks.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/uisimulator/common/sim_tasks.c b/uisimulator/common/sim_tasks.c
index c862d4d909..8c1f193080 100644
--- a/uisimulator/common/sim_tasks.c
+++ b/uisimulator/common/sim_tasks.c
@@ -145,10 +145,17 @@ void sim_trigger_screendump(void)
static bool is_usb_inserted;
void sim_trigger_usb(bool inserted)
{
+ int usbmode = -1;
if (inserted)
+ {
+ send_event(SYS_EVENT_USB_INSERTED, &usbmode);
queue_post(&sim_queue, SIM_USB_INSERTED, 0);
+ }
else
+ {
+ send_event(SYS_EVENT_USB_EXTRACTED, NULL);
queue_post(&sim_queue, SIM_USB_EXTRACTED, 0);
+ }
is_usb_inserted = inserted;
}