[Scummvm-cvs-logs] scummvm master -> fc80f5a34688fa460cd221c8fb3c14f33a3d8d2f

digitall dgturner at iee.org
Sun Feb 16 17:36:17 CET 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
fc80f5a346 SDL: Move debugging code to output SDL video driver name to initBackend.


Commit: fc80f5a34688fa460cd221c8fb3c14f33a3d8d2f
    https://github.com/scummvm/scummvm/commit/fc80f5a34688fa460cd221c8fb3c14f33a3d8d2f
Author: D G Turner (digitall at scummvm.org)
Date: 2014-02-16T08:33:35-08:00

Commit Message:
SDL: Move debugging code to output SDL video driver name to initBackend.

The initBackend() function is called later after the command line is
parsed and thus debug() prints can be used, which are much less noisy.

Changed paths:
    backends/platform/sdl/sdl.cpp



diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index f56c00e..8116282 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -158,6 +158,14 @@ void OSystem_SDL::initBackend() {
 	// Check if backend has not been initialized
 	assert(!_inited);
 
+	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.
+	debug(1, "Using SDL Video Driver \"%s\"", sdlDriverName);
+
 	// Create the default event source, in case a custom backend
 	// manager didn't provide one yet.
 	if (_eventSource == 0)
@@ -274,14 +282,6 @@ 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;
 	}
 }






More information about the Scummvm-git-logs mailing list