mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2025-01-19 09:04:37 +00:00
Add default: break;
to switches on SDL_Event::type
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.
This commit is contained in:
parent
722f4104bf
commit
01248a99c8
@ -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;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return SDLTest_CommonEventMainCallbacks(state, event);
|
||||
|
@ -153,6 +153,8 @@ int main(int argc, char **argv)
|
||||
case SDL_EVENT_QUIT:
|
||||
done = 1;
|
||||
break;
|
||||
default:
|
||||
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);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -74,6 +74,8 @@ static void loop(void)
|
||||
case SDL_EVENT_QUIT:
|
||||
done = SDL_TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -282,6 +282,8 @@ static void loop(void)
|
||||
if (event.key.keysym.sym != SDLK_ESCAPE) {
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,6 +47,8 @@ static void loop(void)
|
||||
mouseX += event.motion.xrel;
|
||||
mouseY += event.motion.yrel;
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < state->num_windows; ++i) {
|
||||
|
@ -114,6 +114,8 @@ static void loop(void)
|
||||
case SDL_EVENT_QUIT:
|
||||
done = SDL_TRUE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user