Print the video driver name.

This commit is contained in:
King_DuckZ 2014-08-06 18:04:15 +02:00
parent 5941e0af56
commit 0d2f584229
3 changed files with 9 additions and 1 deletions

View file

@ -58,7 +58,8 @@ int main (int, char* parArgv[]) {
physfs.Append(GAME_BASE_PATH "/resources/", "resources");
sdlmain.Init();
std::cout << "Using renderer \"" << sdlmain.GetRendererName() << "\"\n";
std::cout << "Using renderer \"" << sdlmain.GetRendererName() << "\" ";
std::cout << "and video driver \"" << sdlmain.GetVideoDriverName() << "\"\n";
cloonel::GameplaySceneClassic game(&sdlmain);
RunMainLoop(game);

View file

@ -199,4 +199,10 @@ namespace cloonel {
ushort2 SDLMain::WidthHeight() const noexcept {
return static_cast<ushort2>(m_localData->sizeratio.Resolution());
}
///------------------------------------------------------------------------
///------------------------------------------------------------------------
std::string SDLMain::GetVideoDriverName() const {
return std::string(SDL_GetCurrentVideoDriver());
}
} //namespace cloonel

View file

@ -43,6 +43,7 @@ namespace cloonel {
void UnregisterForResChange ( size_t parID ) noexcept;
void SwapRegisteredForResChange ( size_t parID, SizeNotifiableBase* parNotif );
const std::string& GetRendererName ( void ) const { return m_rendererName; }
std::string GetVideoDriverName ( void ) const;
private:
struct LocalData;