From 2589228329759839b066aa9c6e4192095573812c Mon Sep 17 00:00:00 2001 From: D G Turner Date: Wed, 12 Feb 2014 12:05:48 +0000 Subject: [PATCH] SDL: Add debugging code to output SDL video driver name being used. --- backends/platform/sdl/sdl.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 913ae51f69f8..f56c00eed554 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -274,6 +274,14 @@ void OSystem_SDL::initSDL() { if (SDL_Init(sdlFlags) == -1) error("Could not initialize SDL: %s", SDL_GetError()); + const int maxNameLen = 20; + char sdlDriverName[maxNameLen]; + sdlDriverName[0] = '\0'; + SDL_VideoDriverName(sdlDriverName, maxNameLen); + // Using printf rather than debug() here as debug()/logging + // is not active by this point. + printf("Using SDL Video Driver \"%s\" ...\n", sdlDriverName); + _initedSDL = true; } }