Change SDL renderer creation error to a fatal one and also include why SDL failed the call

This commit is contained in:
Magnus Norddahl 2019-12-09 23:33:22 +01:00
parent 5e35077364
commit bf68f1a851

View file

@ -282,9 +282,10 @@ uint8_t *I_PolyPresentLock(int w, int h, bool vsync, int &pitch)
{
polyvsync = vsync;
if ((polyrendertarget = SDL_CreateRenderer(Priv::window, -1, vsync ? SDL_RENDERER_PRESENTVSYNC : 0)) == nullptr)
polyrendertarget = SDL_CreateRenderer(Priv::window, -1, vsync ? SDL_RENDERER_PRESENTVSYNC : 0);
if (!polyrendertarget)
{
I_Error("Could not create render target for softpoly.");
I_FatalError("Could not create render target for softpoly: %s\n", SDL_GetError());
}
// Tell the user which render driver is being used, but don't repeat