Skip to content

Commit

Permalink
SDL: Add debugging code to output SDL video driver name being used.
Browse files Browse the repository at this point in the history
  • Loading branch information
digitall committed Feb 12, 2014
1 parent a4ad32c commit 2589228
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions backends/platform/sdl/sdl.cpp
Expand Up @@ -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;
}
}
Expand Down

3 comments on commit 2589228

@clone2727
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is beyond annoying to have this show up on startup all the time.

@digitall
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"beyond annoying" is a bit strong... But I take your poi t. Had to use printf as the debug output / logging is not available at this point. Will look at moving this later and thus using debug or at least qualifying with the debug level so that this is inhibited for levels below 1.

@digitall
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in fc80f5a

Please sign in to comment.