Explorar el Código

Map pause/mute button combos to up/down buttons

Cathy Nguyen hace 3 años
padre
commit
bf9e24029c
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      tamagotchi_p1.c

+ 6 - 0
tamagotchi_p1.c

@@ -264,6 +264,12 @@ int32_t tamagotchi_p1_app(void* p) {
                         tamalib_set_button(BTN_MIDDLE, tama_btn_state);
                     } else if(event.input.key == InputKeyRight) {
                         tamalib_set_button(BTN_RIGHT, tama_btn_state);
+                    } else if(event.input.key == InputKeyUp) { // pause tamagotchi
+                        tamalib_set_button(BTN_LEFT, tama_btn_state);
+                        tamalib_set_button(BTN_Middle, tama_btn_state);
+                    } else if(event.input.key == InputKeyDown) { // mute tamagotchi
+                        tamalib_set_button(BTN_LEFT, tama_btn_state);
+                        tamalib_set_button(BTN_Right, tama_btn_state);
                     }
                 }