[Scummvm-git-logs] scummvm master -> 5757a406d9dd928c027191a4731149512852c1e7

criezy criezy at scummvm.org
Thu Apr 1 19:20:10 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:
5757a406d9 GUI: Display correct ini path when using custom config file


Commit: 5757a406d9dd928c027191a4731149512852c1e7
    https://github.com/scummvm/scummvm/commit/5757a406d9dd928c027191a4731149512852c1e7
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-04-01T20:17:43+01:00

Commit Message:
GUI: Display correct ini path when using custom config file

This should avoid confusion for users when a custom config
file is used (for example for GOG games bundled with ScummVM).

Changed paths:
    common/config-manager.h
    gui/options.cpp


diff --git a/common/config-manager.h b/common/config-manager.h
index 04a2629c13..3383e0f4b0 100644
--- a/common/config-manager.h
+++ b/common/config-manager.h
@@ -207,6 +207,8 @@ public:
 	DomainMap::iterator      beginGameDomains() { return _gameDomains.begin(); } /*!< Return the beginning position of game domains. */
 	DomainMap::iterator      endGameDomains() { return _gameDomains.end(); } /*!< Return the ending position of game domains. */
 
+	const String             &getCustomConfigFileName() { return _filename; } /*!< Return the custom config file being used, or an empty string when using the default config file */
+
 	static void              defragment(); /*!< Move the configuration in memory to reduce fragmentation. */
 	void                     copyFrom(ConfigManager &source); /*!< Copy from a ConfigManager instance. */
 	/** @} */
diff --git a/gui/options.cpp b/gui/options.cpp
index 7c955373cd..c035185a62 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -2086,7 +2086,9 @@ void GlobalOptionsDialog::addPathsControls(GuiObject *boss, const Common::String
 #endif // DYNAMIC_MODULES
 #endif // !defined(__DC__)
 
-	Common::U32String confPath = g_system->getDefaultConfigFileName();
+	Common::U32String confPath = ConfMan.getCustomConfigFileName();
+	if (confPath.empty())
+		confPath = g_system->getDefaultConfigFileName();
 	new StaticTextWidget(boss, prefix + "ConfigPath", _("ScummVM config path: ") + confPath, confPath);
 }
 




More information about the Scummvm-git-logs mailing list