missed a default:break oops

This commit is contained in:
lif 2024-12-15 23:06:30 -08:00
parent 943db8cf5e
commit f864b7db28
1 changed files with 19 additions and 0 deletions

19
main.c
View File

@ -498,6 +498,25 @@ SDL_AppResult SDL_AppEvent(void *appstate, SDL_Event *event) {
case SDL_EVENT_CAMERA_DEVICE_DENIED:
SDL_Log("Camera denied!");
return SDL_APP_FAILURE;
/*
case SDL_EVENT_WINDOW_RESIZED: {
Sint32 winw = event->window.data1, winh = event->window.data2;
SDL_UpdateWindowSurface(window);
if (TODO: need to correct aspect ratio?) {
if (!SDL_SetWindowSize(window, winw/2, winh)) {
SDL_Log("Failed to resize window to %dx%d: %s", winw, winh, SDL_GetError());
return SDL_APP_FAILURE;
} else {
SDL_Log("Resized window to %dx%d", winw, winh);
}
}
break;
}
*/
default:
break;
}
return SDL_APP_CONTINUE;