Made SDL_WINDOWEVENT_* and SDL_DISPLAYEVENT_* first class event types

Fixes https://github.com/libsdl-org/SDL/issues/6772
This commit is contained in:
Sam Lantinga
2022-12-22 07:20:48 -08:00
parent 4676d1d31e
commit 909b513c33
29 changed files with 282 additions and 365 deletions

View File

@@ -56,7 +56,7 @@ void loop()
while (SDL_PollEvent(&e)) {
/* Re-create when window has been resized */
if ((e.type == SDL_WINDOWEVENT) && (e.window.event == SDL_WINDOWEVENT_SIZE_CHANGED)) {
if (e.type == SDL_WINDOWEVENT_SIZE_CHANGED) {
SDL_DestroyRenderer(renderer);