[Scummvm-git-logs] scummvm master -> acba2f544f25dd70337628cae2467868294f6e51

lolbot-iichan lolbot_iichan at mail.ru
Sat Jun 26 18:39:53 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
acba2f544f WINTERMUTE: Init screenmode once


Commit: acba2f544f25dd70337628cae2467868294f6e51
    https://github.com/scummvm/scummvm/commit/acba2f544f25dd70337628cae2467868294f6e51
Author: lb_ii (lolbot_iichan at mail.ru)
Date: 2021-06-26T21:39:51+03:00

Commit Message:
WINTERMUTE: Init screenmode once

Changed paths:
    engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
    engines/wintermute/wintermute.cpp


diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
index 2890111683..2111720a68 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
@@ -34,6 +34,7 @@
 #include "engines/wintermute/math/math_util.h"
 #include "engines/wintermute/base/base_game.h"
 #include "engines/wintermute/base/base_sprite.h"
+#include "engines/util.h"
 #include "common/system.h"
 #include "common/queue.h"
 #include "common/config-manager.h"
@@ -123,11 +124,9 @@ bool BaseRenderOSystem::initRenderer(int width, int height, bool windowed) {
 	_windowed = !ConfMan.getBool("fullscreen");
 
 	Graphics::PixelFormat format(4, 8, 8, 8, 8, 24, 16, 8, 0);
-	g_system->beginGFXTransaction();
-		g_system->initSize(_width, _height, &format);
-	OSystem::TransactionError gfxError = g_system->endGFXTransaction();
+	initGraphics(_width, _height, &format);
 
-	if (gfxError != OSystem::kTransactionSuccess) {
+	if (g_system->getScreenFormat() != format) {
 		warning("Couldn't setup GFX-backend for %dx%dx%d", _width, _height, format.bytesPerPixel * 8);
 		return STATUS_FAILED;
 	}
diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp
index 9929a920db..3f2a04e586 100644
--- a/engines/wintermute/wintermute.cpp
+++ b/engines/wintermute/wintermute.cpp
@@ -31,7 +31,6 @@
 #include "common/tokenizer.h"
 #include "common/translation.h"
 
-#include "engines/util.h"
 #include "engines/wintermute/ad/ad_game.h"
 #include "engines/wintermute/wintermute.h"
 #include "engines/wintermute/debugger.h"
@@ -102,21 +101,6 @@ bool WintermuteEngine::hasFeature(EngineFeature f) const {
 }
 
 Common::Error WintermuteEngine::run() {
-	// Initialize graphics using following:
-	Graphics::PixelFormat format(4, 8, 8, 8, 8, 24, 16, 8, 0);
-	if (_gameDescription->adDesc.flags & GF_LOWSPEC_ASSETS) {
-		initGraphics(320, 240, &format);
-#ifdef ENABLE_FOXTAIL
-	} else if (BaseEngine::isFoxTailCheck(_gameDescription->targetExecutable)) {
-		initGraphics(640, 360, &format);
-#endif
-	} else {
-		initGraphics(800, 600, &format);
-	}
-	if (g_system->getScreenFormat() != format) {
-		return Common::kUnsupportedColorMode;
-	}
-
 	// Create debugger console. It requires GFX to be initialized
 	_dbgController = new DebuggerController(this);
 	_debugger = new Console(this);
@@ -195,7 +179,7 @@ int WintermuteEngine::init() {
 	#ifndef ENABLE_WME3D
 	// check if game require 3D capabilities
 	if (instance.getFlags() & GF_3D) {
-		GUI::MessageDialog dialog(_("This game requires 3D capabilities that are out ScummVM scope. As such, it"
+		GUI::MessageDialog dialog(_("This game requires 3D capabilities, which is not compiled in. As such, it"
 			" is likely to be unplayable totally or partially."), _("Start anyway"), _("Cancel"));
 		if (dialog.runModal() != GUI::kMessageOK) {
 			delete _game;




More information about the Scummvm-git-logs mailing list