From bf68f1a851fd16f7a5828e6cbb61bbdf8eefed59 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Mon, 9 Dec 2019 23:33:22 +0100 Subject: [PATCH] Change SDL renderer creation error to a fatal one and also include why SDL failed the call --- src/posix/sdl/sdlglvideo.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/posix/sdl/sdlglvideo.cpp b/src/posix/sdl/sdlglvideo.cpp index 966367bfef..f95afdfd23 100644 --- a/src/posix/sdl/sdlglvideo.cpp +++ b/src/posix/sdl/sdlglvideo.cpp @@ -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