summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2007-03-05 22:35:19 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2007-03-05 22:35:19 +0000
commite889480bbea454e9b9bd11dc966a9f52ad00ed69 (patch)
tree7e0001ea6a84e590aa14bc84d677bb6a641c9da6 /uisimulator
parentbf1797b4e5375fbb77d785ee7a053552528078ad (diff)
downloadrockbox-e889480bbea454e9b9bd11dc966a9f52ad00ed69.tar.gz
rockbox-e889480bbea454e9b9bd11dc966a9f52ad00ed69.zip
Make sure that the special simulator keys do not interfere with the button handler
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12629 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/sdl/button.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c
index 31bea7dab1..e9f627f148 100644
--- a/uisimulator/sdl/button.c
+++ b/uisimulator/sdl/button.c
@@ -107,13 +107,11 @@ void button_event(int key, bool pressed)
{
usb_connected = !usb_connected;
if (usb_connected)
- btn = SYS_USB_CONNECTED;
+ queue_post(&button_queue, SYS_USB_CONNECTED, 0);
else
- btn = SYS_USB_DISCONNECTED;
- queue_post(&button_queue, btn, 0);
- return;
+ queue_post(&button_queue, SYS_USB_DISCONNECTED, 0);
}
- break;
+ return;
#ifdef HAS_BUTTON_HOLD
case SDLK_h:
@@ -122,7 +120,7 @@ void button_event(int key, bool pressed)
hold_button_state = !hold_button_state;
DEBUGF("Hold button is %s\n", hold_button_state?"ON":"OFF");
}
- break;
+ return;
#endif
#ifdef HAS_REMOTE_BUTTON_HOLD
@@ -133,7 +131,7 @@ void button_event(int key, bool pressed)
DEBUGF("Remote hold button is %s\n",
remote_hold_button_state?"ON":"OFF");
}
- break;
+ return;
#endif
#if CONFIG_KEYPAD == GIGABEAT_PAD