aboutsummaryrefslogtreecommitdiff
path: root/base/main.cpp
diff options
context:
space:
mode:
authorMax Horn2003-11-01 19:13:48 +0000
committerMax Horn2003-11-01 19:13:48 +0000
commitb6d5f750d5f5ff8e565e616011ea5f4d7756c6b4 (patch)
treeb32e7ad27d7e54bac91a711976af46354801b867 /base/main.cpp
parent235047d526667a7b124a51108446e56d4debf9f6 (diff)
downloadscummvm-rg350-b6d5f750d5f5ff8e565e616011ea5f4d7756c6b4.tar.gz
scummvm-rg350-b6d5f750d5f5ff8e565e616011ea5f4d7756c6b4.tar.bz2
scummvm-rg350-b6d5f750d5f5ff8e565e616011ea5f4d7756c6b4.zip
small fix: if one specifies fullscreen=true in the 'scummvm' config section but fullscreen=false in the game specific config section, ScummVM now properly disables fullscreen mode; also, don't use setvbuf with a NULL bufer and a non-zero size param, that's not portable -> use setlinebuf instead
svn-id: r11029
Diffstat (limited to 'base/main.cpp')
-rw-r--r--base/main.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/base/main.cpp b/base/main.cpp
index 7c4c9e4a24..e8872a9b78 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -228,7 +228,7 @@ int main(int argc, char *argv[]) {
}
#endif
}
- setvbuf(stdout, NULL, _IOLBF, BUFSIZ); /* Line buffered */
+ setlinebuf(stdout); /* Line buffered */
setbuf(stderr, NULL); /* No buffering */
#endif //defined(WIN32) && defined(USE_CONSOLE)
@@ -289,11 +289,9 @@ int main(int argc, char *argv[]) {
system->property(OSystem::PROP_SET_GFX_MODE, &prop);
}
- // Override global fullscreen setting with any game-specific define
- if (ConfMan.getBool("fullscreen")) {
- if (!system->property(OSystem::PROP_GET_FULLSCREEN, 0))
- system->property(OSystem::PROP_TOGGLE_FULLSCREEN, 0);
- }
+ // (De)activate fullscreen mode as determined by the config settings
+ if (ConfMan.getBool("fullscreen") != system->property(OSystem::PROP_GET_FULLSCREEN, 0))
+ system->property(OSystem::PROP_TOGGLE_FULLSCREEN, 0);
// Create the game engine
Engine *engine = detector.createEngine(system);