summaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/gui/setup.cpp16
-rw-r--r--src/main.cpp4
2 files changed, 16 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);
}
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);