Simulate usb plugging on the sim better using sim_tasks.

Now all threads need to ack the connection like on real target, dircache is unloaded and playback stops accordingly.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31009 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2011-11-17 18:40:00 +00:00
parent 2a8eacdbfc
commit 1645c148e3
9 changed files with 101 additions and 21 deletions

View file

@ -317,10 +317,7 @@ static void button_event(int key, bool pressed)
if (!pressed)
{
usb_connected = !usb_connected;
if (usb_connected)
queue_post(&button_queue, SYS_USB_CONNECTED, 0);
else
queue_post(&button_queue, SYS_USB_DISCONNECTED, 0);
sim_trigger_usb(usb_connected);
}
return;