Skip to content

Commit

Permalink
Change SDL renderer creation error to a fatal one and also include wh…
Browse files Browse the repository at this point in the history
…y SDL failed the call
  • Loading branch information
dpjudas committed Dec 9, 2019
1 parent 5e35077 commit bf68f1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/posix/sdl/sdlglvideo.cpp
Expand Up @@ -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
Expand Down

0 comments on commit bf68f1a

Please sign in to comment.