Explorar o código

input handling

Nem0oo %!s(int64=3) %!d(string=hai) anos
pai
achega
35a9714002
Modificáronse 1 ficheiros con 10 adicións e 2 borrados
  1. 10 2
      ios_trigger.c

+ 10 - 2
ios_trigger.c

@@ -66,14 +66,22 @@ __int32_t ios_trigger_app(void *p){
                             }
                             break;
                         case(InputKeyUp):
-                            app->delay++;
+                            if(!app->shooting){
+                                app->delay++;
+                            }
                             break;
                         case(InputKeyDown):
-                            app->delay--;
+                            if(!app->shooting){
+                                app->delay--;
+                            }
                             break;
                         case(InputKeyLeft):
                             break;
                         case(InputKeyRight):
+                            furi_hal_bt_hid_consumer_key_press(HID_CONSUMER_VOLUME_INCREMENT);
+                            furi_hal_bt_hid_consumer_key_release(HID_CONSUMER_VOLUME_INCREMENT);
+                            notification_message(app->notifications, &sequence_blink_blue_100);
+                            app->shots++;
                             break;
                         default:
                             break;