This is just a nice-to-have, as `SDL_Event::type` in an `Uint32`, so there are no compiler errors about not handling all `SDL_EventType` enum values.
@@ -2422,6 +2422,8 @@ int SDLTest_CommonEventMainCallbacks(SDLTest_CommonState *state, const SDL_Event
}
case SDL_EVENT_QUIT:
return 1;
+ default:
+ break;
return 0; /* keep going */
@@ -202,6 +202,8 @@ int SDL_AppEvent(const SDL_Event *event)
SDL_Log("Camera denied!");
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Camera permission denied!", "User denied access to the camera!", window);
return -1;
return SDLTest_CommonEventMainCallbacks(state, event);
@@ -153,6 +153,8 @@ int main(int argc, char **argv)
done = 1;
break;
@@ -155,6 +155,8 @@ int main(int argc, char *argv[])
case SDL_EVENT_JOYSTICK_BUTTON_UP:
SDL_Log("Button Release: %d\n", event.jbutton.button);
@@ -74,6 +74,8 @@ static void loop(void)
done = SDL_TRUE;
@@ -282,6 +282,8 @@ static void loop(void)
if (event.key.keysym.sym != SDLK_ESCAPE) {
@@ -47,6 +47,8 @@ static void loop(void)
mouseX += event.motion.xrel;
mouseY += event.motion.yrel;
} break;
for (i = 0; i < state->num_windows; ++i) {
@@ -114,6 +114,8 @@ static void loop(void)