summaryrefslogtreecommitdiff
path: root/src/gui/setup.cpp
diff options
context:
space:
mode:
authorDuane Bailey <nayryeliab@gmail.com>2005-10-16 17:13:04 +0000
committerDuane Bailey <nayryeliab@gmail.com>2005-10-16 17:13:04 +0000
commit837072a1482934a572853f5c41974e4ac90da1ca (patch)
tree7cffa551de84c21c36ca2777ec6ed6745870cdf1 /src/gui/setup.cpp
parenta8a422352df3441d3cf0da967dc94b42c2c21239 (diff)
downloadmana-837072a1482934a572853f5c41974e4ac90da1ca.tar.gz
mana-837072a1482934a572853f5c41974e4ac90da1ca.tar.bz2
mana-837072a1482934a572853f5c41974e4ac90da1ca.tar.xz
mana-837072a1482934a572853f5c41974e4ac90da1ca.zip
gl is default for win/apple/USE_OPENGL, needs to restart for fs
Diffstat (limited to 'src/gui/setup.cpp')
-rw-r--r--src/gui/setup.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index 1938231a..da56f9aa 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -262,17 +262,25 @@ void Setup::action(const std::string &eventId)
bool fullscreen = fsCheckBox->isMarked();
if (fullscreen != (config.getValue("screen", 0) == 1))
{
- if (!graphics->setFullscreen(fullscreen))
+ // checks for opengl usage
+ if (!(config.getValue("opengl", 0) == 1))
{
- fullscreen = !fullscreen;
if (!graphics->setFullscreen(fullscreen))
{
- std::cerr << "Failed to switch to " <<
+ fullscreen = !fullscreen;
+ if (!graphics->setFullscreen(fullscreen))
+ {
+ std::stringstream error;
+ error << "Failed to switch to " <<
(fullscreen ? "windowed" : "fullscreen") <<
"mode and restoration of old mode also failed!" <<
std::endl;
- exit(1);
+ logger->error(error.str());
+ }
}
+ } else {
+ new OkDialog(this, "Switching to FullScreen",
+ "Restart needed for changes to take effect.");
}
config.setValue("screen", fullscreen ? 1 : 0);
}