+
+ for(uint8_t i = 0; i < 75; ) {
+ badge_event_t ev = badge_event_wait();
+ if(badge_event_type(ev) == BADGE_EVENT_GAME_TICK) {
+ ++i;
+ } else if(i > 25) {
+ uint8_t old_state = badge_event_old_input_state(ev);
+ uint8_t new_state = badge_event_new_input_state(ev);
+ uint8_t new_buttons = new_state & (old_state ^ new_state);
+
+ if(new_buttons != 0) break;
+ }
+ }