diff options
Diffstat (limited to 'firmware/target/hosted/sdl/button-sdl.c')
-rw-r--r-- | firmware/target/hosted/sdl/button-sdl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/firmware/target/hosted/sdl/button-sdl.c b/firmware/target/hosted/sdl/button-sdl.c index 837cba4dc4..335685a45f 100644 --- a/firmware/target/hosted/sdl/button-sdl.c +++ b/firmware/target/hosted/sdl/button-sdl.c | |||
@@ -309,10 +309,9 @@ static void button_event(int key, bool pressed) | |||
309 | { | 309 | { |
310 | int new_btn = 0; | 310 | int new_btn = 0; |
311 | static bool usb_connected = false; | 311 | static bool usb_connected = false; |
312 | if (usb_connected && key != USB_KEY) | ||
313 | return; | ||
314 | switch (key) | 312 | switch (key) |
315 | { | 313 | { |
314 | #ifdef SIMULATOR | ||
316 | case USB_KEY: | 315 | case USB_KEY: |
317 | if (!pressed) | 316 | if (!pressed) |
318 | { | 317 | { |
@@ -320,7 +319,7 @@ static void button_event(int key, bool pressed) | |||
320 | sim_trigger_usb(usb_connected); | 319 | sim_trigger_usb(usb_connected); |
321 | } | 320 | } |
322 | return; | 321 | return; |
323 | 322 | #endif | |
324 | #if (CONFIG_PLATFORM & PLATFORM_PANDORA) | 323 | #if (CONFIG_PLATFORM & PLATFORM_PANDORA) |
325 | case SDLK_LCTRL: | 324 | case SDLK_LCTRL: |
326 | /* Will post SDL_USEREVENT in shutdown_hw() if successful. */ | 325 | /* Will post SDL_USEREVENT in shutdown_hw() if successful. */ |
@@ -372,6 +371,7 @@ static void button_event(int key, bool pressed) | |||
372 | } | 371 | } |
373 | break; | 372 | break; |
374 | #endif | 373 | #endif |
374 | #ifndef APPLICATION | ||
375 | case SDLK_KP0: | 375 | case SDLK_KP0: |
376 | case SDLK_F5: | 376 | case SDLK_F5: |
377 | if(pressed) | 377 | if(pressed) |
@@ -380,6 +380,7 @@ static void button_event(int key, bool pressed) | |||
380 | return; | 380 | return; |
381 | } | 381 | } |
382 | break; | 382 | break; |
383 | #endif | ||
383 | #ifdef HAVE_TOUCHSCREEN | 384 | #ifdef HAVE_TOUCHSCREEN |
384 | case SDLK_F4: | 385 | case SDLK_F4: |
385 | if(pressed) | 386 | if(pressed) |