From b6d5f750d5f5ff8e565e616011ea5f4d7756c6b4 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 1 Nov 2003 19:13:48 +0000 Subject: 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 --- base/main.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'base/main.cpp') 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); -- cgit v1.2.3