]> git.earman.xyz Git - sensor-watch.git/commitdiff
Fixed duplicate cases
authorDavid Volovskiy <devolov@gmail.com>
Wed, 20 Aug 2025 01:47:51 +0000 (21:47 -0400)
committerDavid Volovskiy <devolov@gmail.com>
Wed, 20 Aug 2025 01:47:51 +0000 (21:47 -0400)
watch-faces/complication/endless_runner_face.c

index 1f245e8d585ceea7359008b1af7bc697b0e80a6e..7f6837babae5ca2b35a538340a00f9ba257f00d4 100644 (file)
@@ -547,10 +547,6 @@ bool endless_runner_face_loop(movement_event_t event, void *context) {
                 break;
             }
             break;
-        case EVENT_SINGLE_TAP:
-        case EVENT_DOUBLE_TAP:
-            if (state->difficulty > DIFF_HARD) break; // Don't do this on fuel modes
-            //fall through
         case EVENT_LIGHT_BUTTON_UP:
         case EVENT_ALARM_BUTTON_UP:
             if (game_state.curr_screen == SCREEN_TITLE)
@@ -565,6 +561,15 @@ bool endless_runner_face_loop(movement_event_t event, void *context) {
         case EVENT_SINGLE_TAP:
         case EVENT_DOUBLE_TAP:
             if (state->difficulty > DIFF_HARD) break; // Don't do this on fuel modes
+            // Allow starting a new game by tapping.
+            if (game_state.curr_screen == SCREEN_TITLE) {
+                begin_playing(state);
+                break;
+            }
+            else if (game_state.curr_screen == SCREEN_LOSE) {
+                display_title(state);
+                break;
+            }
             //fall through
         case EVENT_LIGHT_BUTTON_DOWN:
         case EVENT_ALARM_BUTTON_DOWN: