diff options
author | Duane Bailey <nayryeliab@gmail.com> | 2005-10-16 17:13:04 +0000 |
---|---|---|
committer | Duane Bailey <nayryeliab@gmail.com> | 2005-10-16 17:13:04 +0000 |
commit | 837072a1482934a572853f5c41974e4ac90da1ca (patch) | |
tree | 7cffa551de84c21c36ca2777ec6ed6745870cdf1 | |
parent | a8a422352df3441d3cf0da967dc94b42c2c21239 (diff) | |
download | mana-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
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/gui/setup.cpp | 16 | ||||
-rw-r--r-- | src/main.cpp | 4 |
3 files changed, 23 insertions, 4 deletions
@@ -1,3 +1,10 @@ +2005-10-16 Duane Bailey <nayryeliab@gmail.com> + + * src/main.cpp: opengl is now default for mac, win, and those who + define USE_OPENGL + * src/gui/setup.cpp: made it so those who use and go to fullscreen + requires a restart (texture/context baddies) + 2005-10-16 Björn Steinbrink <B.Steinbrink@gmx.de> * src/map.cpp: Some code improvements. 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); } diff --git a/src/main.cpp b/src/main.cpp index 6ce9dd3a..90a0aac3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -185,7 +185,11 @@ void init_engine() config.setValue("host", "animesites.de"); config.setValue("port", 6901); config.setValue("hwaccel", 0); + #if defined __APPLE__ || defined WIN32 || defined USE_OPENGL + config.setValue("opengl", 1); + #else config.setValue("opengl", 0); + #endif config.setValue("screen", 0); config.setValue("sound", 1); config.setValue("guialpha", 0.8f); |