summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-01-24 11:56:26 +0100
committerPatric Stout <github@truebrain.nl>2021-01-30 21:43:59 +0100
commiteb80fefd1db73dcc2cfd9439749dfaea42dee89f (patch)
tree3212fa416bda2cec593f7bec990752da6ef80892 /src/video
parent19345908cba1bf12a138162b18d6db39662cb762 (diff)
downloadopenttd-eb80fefd1db73dcc2cfd9439749dfaea42dee89f.tar.xz
Fix: [SDL2] Display why SDL_CreateWindow() failed in case it does
All SDL_NNN errors print SDL_GetError, except for this one place.
Diffstat (limited to 'src/video')
-rw-r--r--src/video/sdl2_v.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video/sdl2_v.cpp b/src/video/sdl2_v.cpp
index e4518d5b3..61edea6e0 100644
--- a/src/video/sdl2_v.cpp
+++ b/src/video/sdl2_v.cpp
@@ -306,7 +306,7 @@ bool VideoDriver_SDL::CreateMainWindow(uint w, uint h)
flags);
if (_sdl_window == nullptr) {
- DEBUG(driver, 0, "SDL2: Couldn't allocate a window to draw on");
+ DEBUG(driver, 0, "SDL2: Couldn't allocate a window to draw on: %s", SDL_GetError());
return false;
}