summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--src/gui/setup.cpp16
-rw-r--r--src/main.cpp4
3 files changed, 23 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b626f20..d43949ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);