From e889480bbea454e9b9bd11dc966a9f52ad00ed69 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Mon, 5 Mar 2007 22:35:19 +0000 Subject: 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 --- uisimulator/sdl/button.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'uisimulator') 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 -- cgit v1.2.3