diff engine/core/controller/enginesettings.cpp @ 640:855ad500f991

* Added the ability to set/get the video driver used using the settings interface. Note that the default driver for the OS will be used unless explicitly specified.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Thu, 07 Oct 2010 18:37:02 +0000
parents a7909cdcdc85
children 51bbda7676f0
line wrap: on
line diff
--- a/engine/core/controller/enginesettings.cpp	Thu Oct 07 16:44:44 2010 +0000
+++ b/engine/core/controller/enginesettings.cpp	Thu Oct 07 18:37:02 2010 +0000
@@ -50,10 +50,21 @@
 		m_defaultfontpath(""),
 		m_defaultfontsize(8),
 		m_defaultfontglyphs(""),
-		m_iscolorkeyenabled(false) {
+		m_iscolorkeyenabled(false){
 			m_colorkey.r = 255;
 			m_colorkey.g = 0;
 			m_colorkey.b = 255;
+
+#if defined( __unix__ )
+			m_videodriver = "x11";
+#elif defined( WIN32 )
+			m_videodriver = "windib";
+#elif defined( __APPLE_CC__ )
+			m_videodriver = "x11";
+#else
+			m_videodriver = "";
+#endif
+
 	}
 
 	EngineSettings::~EngineSettings() {
@@ -180,5 +191,13 @@
 	const SDL_Color& EngineSettings::getColorKey() const {
 		return m_colorkey;
 	}
+
+	void EngineSettings::setVideoDriver(const std::string& driver) {
+		m_videodriver = driver;
+	}
+
+	const std::string& EngineSettings::getVideoDriver() const {
+		return m_videodriver;
+	}
 }