summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/target/hosted/sdl/button-sdl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/target/hosted/sdl/button-sdl.c b/firmware/target/hosted/sdl/button-sdl.c
index 335685a..d3b30b4 100644
--- a/firmware/target/hosted/sdl/button-sdl.c
+++ b/firmware/target/hosted/sdl/button-sdl.c
@@ -308,13 +308,13 @@ void gui_message_loop(void)
static void button_event(int key, bool pressed)
{
int new_btn = 0;
- static bool usb_connected = false;
switch (key)
{
#ifdef SIMULATOR
case USB_KEY:
if (!pressed)
{
+ static bool usb_connected = false;
usb_connected = !usb_connected;
sim_trigger_usb(usb_connected);
}