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

criezy noreply at scummvm.org
Tue May 16 00:16:21 UTC 2023


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:
e9eba6ad20 AGS: Fix regression with translation setting change not saved


Commit: e9eba6ad20af23c5d4cab95138738ecc9421fe69
    https://github.com/scummvm/scummvm/commit/e9eba6ad20af23c5d4cab95138738ecc9421fe69
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2023-05-16T01:12:32+01:00

Commit Message:
AGS: Fix regression with translation setting change not saved

When the setting is changed in game (for example in the Options
dialog in Kathy Rain) that change used to be saved in the ScummVM
config file, but this got lost during one of the synchronisation
with upstream code. This commit adds that code back.

Changed paths:
    engines/ags/engine/main/config.cpp


diff --git a/engines/ags/engine/main/config.cpp b/engines/ags/engine/main/config.cpp
index a9c2a3ad354..3b0b3e7300f 100644
--- a/engines/ags/engine/main/config.cpp
+++ b/engines/ags/engine/main/config.cpp
@@ -391,7 +391,16 @@ void post_config() {
 }
 
 void save_config_file() {
-	// ScummVM doesn't write out any configuration changes
+	// Translation / localization
+	if (!_GP(usetup).translation.IsEmpty()) {
+		ConfMan.getActiveDomain()->setVal("translation", _GP(usetup).translation.GetCStr());
+		ConfMan.flushToDisk();
+	} else if (ConfMan.getActiveDomain()->contains("translation")) {
+		ConfMan.getActiveDomain()->erase("translation");
+		ConfMan.flushToDisk();
+	}
+
+	// ScummVM doesn't write out other configuration changes
 }
 
 } // namespace AGS3




More information about the Scummvm-git-logs mailing list