From 0d2f584229bcee891ff6a97011a4f5db9f0f29a8 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Wed, 6 Aug 2014 18:04:15 +0200 Subject: [PATCH] Print the video driver name. --- src/main.cpp | 3 ++- src/sdlmain.cpp | 6 ++++++ src/sdlmain.hpp | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index c13a0f6..d03f5db 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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); diff --git a/src/sdlmain.cpp b/src/sdlmain.cpp index f2c9654..4d3f84c 100644 --- a/src/sdlmain.cpp +++ b/src/sdlmain.cpp @@ -199,4 +199,10 @@ namespace cloonel { ushort2 SDLMain::WidthHeight() const noexcept { return static_cast(m_localData->sizeratio.Resolution()); } + + ///------------------------------------------------------------------------ + ///------------------------------------------------------------------------ + std::string SDLMain::GetVideoDriverName() const { + return std::string(SDL_GetCurrentVideoDriver()); + } } //namespace cloonel diff --git a/src/sdlmain.hpp b/src/sdlmain.hpp index 725540c..dc05b8c 100644 --- a/src/sdlmain.hpp +++ b/src/sdlmain.hpp @@ -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;