[Scummvm-cvs-logs] CVS: scummvm/bs2 sword2.cpp,1.19,1.20

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Wed Aug 27 06:33:13 CEST 2003


Update of /cvsroot/scummvm/scummvm/bs2
In directory sc8-pr-cvs1:/tmp/cvs-serv9515

Modified Files:
	sword2.cpp 
Log Message:
Add code to check for game-specific scaler and fullscreen settings, like we
do for the other game engines.


Index: sword2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sword2.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- sword2.cpp	26 Aug 2003 06:52:59 -0000	1.19
+++ sword2.cpp	27 Aug 2003 13:31:47 -0000	1.20
@@ -26,6 +26,7 @@
 #include "driver/driver96.h"
 #include "driver/palette.h"
 #include "common/gameDetector.h"
+#include "common/config-file.h"
 #include "common/timer.h"
 #include "build_display.h"
 #include "console.h"
@@ -242,6 +243,7 @@
 // int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
 void Sword2State::go()
 {
+	OSystem::Property prop;
 	uint32 rv;
 	uint8  breakOut = 0;
 	char	c;
@@ -274,9 +276,21 @@
 		return;
 	}
 
+	// Override global scaler with any game-specific define
+	if (g_config->get("gfx_mode")) {
+		prop.gfx_mode = _detector->parseGraphicsMode(g_config->get("gfx_mode"));
+		_system->property(OSystem::PROP_SET_GFX_MODE, &prop);
+	}
+
 	Zdebug("CALLING: InitialiseDisplay");
 	_system->init_size(640, 480);
 	rv = InitialiseDisplay(640, 480, 8, RD_FULLSCREEN);
+
+	// Override global fullscreen setting with any game-specific define
+	if (g_config->getBool("fullscreen", false)) {
+		if (!_system->property(OSystem::PROP_GET_FULLSCREEN, 0))
+			_system->property(OSystem::PROP_TOGGLE_FULLSCREEN, 0);
+	}
 		
 	Zdebug("RETURNED with rv = %.8x", rv);
 	if (rv != RD_OK)





More information about the Scummvm-git-logs mailing list