Hello.
Anyone notice how when a window is created using sdl2, it immediately closes and a new one is created again? It doesn't seem to have any negative effects, but it does bother me a little. What's going on here?
From what I can gather, sdl2 will try to use hardware rendering if possible, so my guess is the first time it makes a window for software rendering, then detects my computer can use hardware rendering, so it closes the window and creates a hardware rendering window. But that happens even if I specify the opengl flag.
Any ideas?
edit:
the tool chain I use is mingw.
the way I set them up goes like this:
SDL_InitSubSystem(SDL_INIT_VIDEO | SDL_INIT_EVENTS | SDL_INIT_TIMER);
screen = SDL_CreateWindow("shooter game", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, window_width, window_height, 0);
renderer = SDL_CreateRenderer(screen, -1, 0);