diff --git a/examples/demo/01-snake/snake.c b/examples/demo/01-snake/snake.c index c5c6737539..d740f2c6e0 100644 --- a/examples/demo/01-snake/snake.c +++ b/examples/demo/01-snake/snake.c @@ -219,7 +219,6 @@ static SDL_AppResult handle_key_event_(SnakeContext *ctx, SDL_Scancode key_code) case SDL_SCANCODE_ESCAPE: case SDL_SCANCODE_Q: return SDL_APP_SUCCESS; - break; /* Restart the game as if the program was launched. */ case SDL_SCANCODE_R: snake_initialize(ctx); @@ -359,7 +358,6 @@ SDL_AppResult SDL_AppEvent(void *appstate, SDL_Event *event) switch (event->type) { case SDL_EVENT_QUIT: return SDL_APP_SUCCESS; - break; case SDL_EVENT_JOYSTICK_ADDED: if (joystick == NULL) { joystick = SDL_OpenJoystick(event->jdevice.which); @@ -376,10 +374,8 @@ SDL_AppResult SDL_AppEvent(void *appstate, SDL_Event *event) break; case SDL_EVENT_JOYSTICK_HAT_MOTION: return handle_hat_event_(ctx, event->jhat.value); - break; case SDL_EVENT_KEY_DOWN: return handle_key_event_(ctx, event->key.scancode); - break; default: break; }