summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxdavidwu <xdavidwuph@gmail.com>2020-01-16 04:16:53 +0800
committerCharles Pigott <charlespigott@googlemail.com>2020-01-15 20:16:53 +0000
commit8fe38afd2b335831a5659e5ef44254fde769c727 (patch)
treec542382deebbcb870d76718fa1afb8682fb7f801
parentd7a928a08b0d614bc06f4a6e8a275582a100599f (diff)
downloadopenttd-8fe38afd2b335831a5659e5ef44254fde769c727.tar.xz
Fix: [SDL2] Correct name of the video driver in debug log
SDL_GetVideoDriver(0) returns name of first video driver included in the library, not the driver currently used. SDL_GetCurrentVideoDriver() does what we want here.
-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 9ae8c3ca2..0b3b9b8e3 100644
--- a/src/video/sdl2_v.cpp
+++ b/src/video/sdl2_v.cpp
@@ -647,7 +647,7 @@ const char *VideoDriver_SDL::Start(const char * const *parm)
return SDL_GetError();
}
- const char *dname = SDL_GetVideoDriver(0);
+ const char *dname = SDL_GetCurrentVideoDriver();
DEBUG(driver, 1, "SDL2: using driver '%s'", dname);
MarkWholeScreenDirty();