1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Linus Nielsen Feltzing 2007-03-05 22:35:19 +00:00
parent bf1797b4e5
commit e889480bbe

View file

@ -107,13 +107,11 @@ void button_event(int key, bool pressed)
{ {
usb_connected = !usb_connected; usb_connected = !usb_connected;
if (usb_connected) if (usb_connected)
btn = SYS_USB_CONNECTED; queue_post(&button_queue, SYS_USB_CONNECTED, 0);
else else
btn = SYS_USB_DISCONNECTED; queue_post(&button_queue, SYS_USB_DISCONNECTED, 0);
queue_post(&button_queue, btn, 0);
return;
} }
break; return;
#ifdef HAS_BUTTON_HOLD #ifdef HAS_BUTTON_HOLD
case SDLK_h: case SDLK_h:
@ -122,7 +120,7 @@ void button_event(int key, bool pressed)
hold_button_state = !hold_button_state; hold_button_state = !hold_button_state;
DEBUGF("Hold button is %s\n", hold_button_state?"ON":"OFF"); DEBUGF("Hold button is %s\n", hold_button_state?"ON":"OFF");
} }
break; return;
#endif #endif
#ifdef HAS_REMOTE_BUTTON_HOLD #ifdef HAS_REMOTE_BUTTON_HOLD
@ -133,7 +131,7 @@ void button_event(int key, bool pressed)
DEBUGF("Remote hold button is %s\n", DEBUGF("Remote hold button is %s\n",
remote_hold_button_state?"ON":"OFF"); remote_hold_button_state?"ON":"OFF");
} }
break; return;
#endif #endif
#if CONFIG_KEYPAD == GIGABEAT_PAD #if CONFIG_KEYPAD == GIGABEAT_PAD