Mercurial > fife-parpg
comparison 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 |
comparison
equal
deleted
inserted
replaced
639:685d250f2c2d | 640:855ad500f991 |
---|---|
48 m_windowtitle("FIFE"), | 48 m_windowtitle("FIFE"), |
49 m_windowicon(""), | 49 m_windowicon(""), |
50 m_defaultfontpath(""), | 50 m_defaultfontpath(""), |
51 m_defaultfontsize(8), | 51 m_defaultfontsize(8), |
52 m_defaultfontglyphs(""), | 52 m_defaultfontglyphs(""), |
53 m_iscolorkeyenabled(false) { | 53 m_iscolorkeyenabled(false){ |
54 m_colorkey.r = 255; | 54 m_colorkey.r = 255; |
55 m_colorkey.g = 0; | 55 m_colorkey.g = 0; |
56 m_colorkey.b = 255; | 56 m_colorkey.b = 255; |
57 | |
58 #if defined( __unix__ ) | |
59 m_videodriver = "x11"; | |
60 #elif defined( WIN32 ) | |
61 m_videodriver = "windib"; | |
62 #elif defined( __APPLE_CC__ ) | |
63 m_videodriver = "x11"; | |
64 #else | |
65 m_videodriver = ""; | |
66 #endif | |
67 | |
57 } | 68 } |
58 | 69 |
59 EngineSettings::~EngineSettings() { | 70 EngineSettings::~EngineSettings() { |
60 } | 71 } |
61 | 72 |
178 } | 189 } |
179 | 190 |
180 const SDL_Color& EngineSettings::getColorKey() const { | 191 const SDL_Color& EngineSettings::getColorKey() const { |
181 return m_colorkey; | 192 return m_colorkey; |
182 } | 193 } |
194 | |
195 void EngineSettings::setVideoDriver(const std::string& driver) { | |
196 m_videodriver = driver; | |
197 } | |
198 | |
199 const std::string& EngineSettings::getVideoDriver() const { | |
200 return m_videodriver; | |
201 } | |
183 } | 202 } |
184 | 203 |