From 2589228329759839b066aa9c6e4192095573812c Mon Sep 17 00:00:00 2001 From: D G Turner Date: Wed, 12 Feb 2014 12:05:48 +0000 Subject: SDL: Add debugging code to output SDL video driver name being used. --- backends/platform/sdl/sdl.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'backends/platform/sdl/sdl.cpp') diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 913ae51f69..f56c00eed5 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; } } -- cgit v1.2.3 From fc80f5a34688fa460cd221c8fb3c14f33a3d8d2f Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sun, 16 Feb 2014 16:33:35 +0000 Subject: 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. --- backends/platform/sdl/sdl.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'backends/platform/sdl/sdl.cpp') diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index f56c00eed5..8116282c30 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; } } -- cgit v1.2.3 From 63304ee9ec4bf37cc96949f32f5c8dd53a6d3cc4 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 18 Feb 2014 02:34:24 +0100 Subject: SDL: Make GPL headers consistent in themselves. --- backends/platform/sdl/sdl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/platform/sdl/sdl.cpp') diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 8116282c30..41610dc0c7 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -- cgit v1.2.3