I'm using the latest SDL2 and build the demo on macOS.
When it comes to 05_DecodeAndDisplayVideo.cpp, the SDL does not show any window.
Finally I find the solution:
(the while loop after initSDL should be like this or else no window will show up)
SDL_Event e;
bool quit = false;
while (!quit){
// original content in while loop
while (SDL_PollEvent(&e)){
if (e.type == SDL_QUIT){
quit = true;
}
if (e.type == SDL_KEYDOWN){
quit = true;
}
if (e.type == SDL_MOUSEBUTTONDOWN){
quit = true;
}
}
}
I'm using the latest SDL2 and build the demo on macOS. When it comes to
05_DecodeAndDisplayVideo.cpp
, the SDL does not show any window. Finally I find the solution: (the while loop after initSDL should be like this or else no window will show up)