[Scummvm-git-logs] scummvm branch-2-9 -> c9817cb05a0d565f5a9f07159d0ca093a6eee123

bluegr noreply at scummvm.org
Wed Nov 20 06:10:07 UTC 2024


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

Summary:
514bb7fbc8 ENGINES: Use common GFX code for 3D games - fixes part of bug #14342
c9817cb05a GOB: Add missing commands to the console help text


Commit: 514bb7fbc82509cdbe3dd5dce0d7a342266d2303
    https://github.com/scummvm/scummvm/commit/514bb7fbc82509cdbe3dd5dce0d7a342266d2303
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2024-11-20T08:09:44+02:00

Commit Message:
ENGINES: Use common GFX code for 3D games - fixes part of bug #14342

Now, when the launcher is in full screen, the game will also be in full
screen. However, when returning to the launcher, graphics are reset to
default with a setupGraphics() call. Thus, if the user hasn't selected
full screen display in the options, but only used alt-enter to change
the launcher to full screen, the launcher will return to window mode.

Changed paths:
    engines/engine.cpp


diff --git a/engines/engine.cpp b/engines/engine.cpp
index 9d88f9c6803..a5f557cb32b 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -237,36 +237,42 @@ void initCommonGFX() {
 	// Any global or command line settings already have been applied at the time
 	// we get here, so we only do something if the game domain overrides those
 	// values
-	if (gameDomain) {
-		if (gameDomain->contains("aspect_ratio"))
-			g_system->setFeatureState(OSystem::kFeatureAspectRatioCorrection, ConfMan.getBool("aspect_ratio"));
+	if (!gameDomain)
+		return;
+
+	if (gameDomain->contains("aspect_ratio"))
+		g_system->setFeatureState(OSystem::kFeatureAspectRatioCorrection, ConfMan.getBool("aspect_ratio"));
+
+	if (gameDomain->contains("fullscreen"))
+		g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen"));
 
-		if (gameDomain->contains("fullscreen"))
-			g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen"));
+	if (gameDomain->contains("vsync"))
+		g_system->setFeatureState(OSystem::kFeatureVSync, ConfMan.getBool("vsync"));
 
-		if (gameDomain->contains("filtering"))
-			g_system->setFeatureState(OSystem::kFeatureFilteringMode, ConfMan.getBool("filtering"));
+	if (gameDomain->contains("stretch_mode"))
+		g_system->setStretchMode(ConfMan.get("stretch_mode").c_str());
 
-		if (gameDomain->contains("vsync"))
-			g_system->setFeatureState(OSystem::kFeatureVSync, ConfMan.getBool("vsync"));
+	// Stop here for hardware-accelerated 3D games
+	if (g_system->hasFeature(OSystem::kFeatureOpenGLForGame))
+		return;
 
-		if (gameDomain->contains("stretch_mode"))
-			g_system->setStretchMode(ConfMan.get("stretch_mode").c_str());
+	// Set up filtering, scaling and shaders for 2D games
+	if (gameDomain->contains("filtering"))
+		g_system->setFeatureState(OSystem::kFeatureFilteringMode, ConfMan.getBool("filtering"));
 
-		if (gameDomain->contains("scaler") || gameDomain->contains("scale_factor"))
-			g_system->setScaler(ConfMan.get("scaler").c_str(), ConfMan.getInt("scale_factor"));
+	if (gameDomain->contains("scaler") || gameDomain->contains("scale_factor"))
+		g_system->setScaler(ConfMan.get("scaler").c_str(), ConfMan.getInt("scale_factor"));
 
-		if (gameDomain->contains("shader"))
-			g_system->setShader(ConfMan.getPath("shader"));
+	if (gameDomain->contains("shader"))
+		g_system->setShader(ConfMan.getPath("shader"));
 
-		// TODO: switching between OpenGL and SurfaceSDL is quite fragile
-		// and the SDL backend doesn't really need this so leave it out
-		// for now to avoid regressions
+	// TODO: switching between OpenGL and SurfaceSDL is quite fragile
+	// and the SDL backend doesn't really need this so leave it out
+	// for now to avoid regressions
 #ifndef SDL_BACKEND
-		if (gameDomain->contains("gfx_mode"))
-			g_system->setGraphicsMode(ConfMan.get("gfx_mode").c_str());
+	if (gameDomain->contains("gfx_mode"))
+		g_system->setGraphicsMode(ConfMan.get("gfx_mode").c_str());
 #endif
-	}
 }
 
 // Please leave the splash screen in working order for your releases, even if they're commercial.
@@ -486,11 +492,8 @@ void initGraphics(int width, int height) {
 void initGraphics3d(int width, int height) {
 	g_system->beginGFXTransaction();
 		g_system->setGraphicsMode(0, OSystem::kGfxModeRender3d);
+		initCommonGFX();
 		g_system->initSize(width, height);
-		g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen")); // TODO: Replace this with initCommonGFX()
-		g_system->setFeatureState(OSystem::kFeatureAspectRatioCorrection, ConfMan.getBool("aspect_ratio")); // TODO: Replace this with initCommonGFX()
-		g_system->setFeatureState(OSystem::kFeatureVSync, ConfMan.getBool("vsync")); // TODO: Replace this with initCommonGFX()
-		g_system->setStretchMode(ConfMan.get("stretch_mode").c_str()); // TODO: Replace this with initCommonGFX()
 	g_system->endGFXTransaction();
 
 	if (!splash && !GUI::GuiManager::instance()._launched) {


Commit: c9817cb05a0d565f5a9f07159d0ca093a6eee123
    https://github.com/scummvm/scummvm/commit/c9817cb05a0d565f5a9f07159d0ca093a6eee123
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2024-11-20T08:09:44+02:00

Commit Message:
GOB: Add missing commands to the console help text

Changed paths:
    engines/gob/console.cpp


diff --git a/engines/gob/console.cpp b/engines/gob/console.cpp
index 3bbbe41e9c3..8bcb70a94d5 100644
--- a/engines/gob/console.cpp
+++ b/engines/gob/console.cpp
@@ -58,11 +58,12 @@ void GobConsole::unregisterCheater() {
 }
 
 bool GobConsole::cmd_Help(int, const char **) {
-	debugPrintf("Debug flags\n");
-	debugPrintf("-----------\n");
+	debugPrintf("Debug\n");
+	debugPrintf("-----\n");
 	debugPrintf(" debugflag_list - Lists the available debug flags and their status\n");
 	debugPrintf(" debugflag_enable - Enables a debug flag\n");
 	debugPrintf(" debugflag_disable - Disables a debug flag\n");
+	debugPrintf(" debuglevel - Sets debug level\n");
 	debugPrintf("\n");
 	debugPrintf("Commands\n");
 	debugPrintf("--------\n");
@@ -77,6 +78,7 @@ bool GobConsole::cmd_Help(int, const char **) {
 	debugPrintf(" var8 - manipulates 8-bit variables; usage: var8 <var offset> (<value>)\n");
 	debugPrintf(" var16 - manipulates 16-bit variables; usage: var16 <var offset> (<value>)\n");
 	debugPrintf(" var32 - manipulates 32-bit variables; usage: var32 <var offset> (<value>)\n");
+	debugPrintf(" varString - manipulates string references; usage: varString <var offset> (<value>)\n");
 	debugPrintf("\n");
 	return true;
 }
@@ -169,7 +171,7 @@ bool GobConsole::cmd_var32(int argc, const char **argv) {
 		_vm->_inter->_variables->writeOff32(varNum, varVal);
 	}
 
-	debugPrintf("var8_%d = %d\n", varNum, _vm->_inter->_variables->readOff32(varNum));
+	debugPrintf("var32_%d = %d\n", varNum, _vm->_inter->_variables->readOff32(varNum));
 
 	return true;
 }




More information about the Scummvm-git-logs mailing list