Mercurial > sumwars
changeset 2006:b5e34c313765
Minor style corrections and removal of cruft such as alien iphone preprocessor definitions
author | mafm |
---|---|
date | Sun, 30 Oct 2011 22:30:01 +0000 |
parents | 69d8ba6c11eb |
children | d72a92c70150 |
files | src/gui/optionswindow.cpp src/gui/optionswindow.h |
diffstat | 2 files changed, 13 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gui/optionswindow.cpp Sun Oct 30 22:24:45 2011 +0000 +++ b/src/gui/optionswindow.cpp Sun Oct 30 22:30:01 2011 +0000 @@ -550,19 +550,16 @@ Options::getInstance ()->setUsedVideoDriver (selectedDriverName); std::string configpath; -#ifdef _WIN32 +#if defined (_WIN32) configpath = SumwarsHelper::userPath() + "/ogre.cfg"; -#elif defined __APPLE__ +#elif defined (__APPLE__) configpath = SumwarsHelper::macPath() + "/ogre.cfg"; -#else +#elif defined (__unix__) configpath = SumwarsHelper::userPath() + "/ogre.cfg"; #endif // TODO: move handling to specialized function. -#if OGRE_PLATFORM == OGRE_PLATFORM_IPHONE -#pragma message("Iphone support not added for saving video mode!") -#endif - Ogre::ConfigFile cfg; + Ogre::ConfigFile cfg; try { // Don't trim whitespace @@ -578,7 +575,7 @@ { throw; } - } + } // Prepare the list of values to write. @@ -746,13 +743,14 @@ bool OptionsWindow::onResetGraphics(const CEGUI::EventArgs& evt) { std::string configpath; -#ifdef _WIN32 - configpath = SumwarsHelper::userPath() + "/ogre.cfg"; -#elif defined __APPLE__ - configpath = macPath() + "/ogre.cfg"; -#else - configpath = SumwarsHelper::userPath() + "/ogre.cfg"; +#if defined (_WIN32) + configpath = SumwarsHelper::userPath() + "/ogre.cfg"; +#elif defined (__APPLE__) + configpath = SumwarsHelper::macPath() + "/ogre.cfg"; +#elif defined (__unix__) + configpath = SumwarsHelper::userPath() + "/ogre.cfg"; #endif + remove(configpath.c_str()); return true; }