[Scummvm-git-logs] scummvm master -> 9acaed1f895c1fdb09ab1e5fdaccf5ffaef66bbd

sev- noreply at scummvm.org
Sun Mar 19 23:17:24 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:
9acaed1f89 AGS: auto-detect Linux games based on executable


Commit: 9acaed1f895c1fdb09ab1e5fdaccf5ffaef66bbd
    https://github.com/scummvm/scummvm/commit/9acaed1f895c1fdb09ab1e5fdaccf5ffaef66bbd
Author: marius david (marius at mariusdavid.fr)
Date: 2023-03-20T00:17:20+01:00

Commit Message:
AGS: auto-detect Linux games based on executable

ags64 (and also ags32) are the name of the engine executable on Linux.
These names seems to be exclusivelly used for that OS.
Fix a bug in Zniw Adventure (GOG, Linux) due to translation path being
different between Linux and Windows.

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 6dfd83a1267..a9c2a3ad354 100644
--- a/engines/ags/engine/main/config.cpp
+++ b/engines/ags/engine/main/config.cpp
@@ -354,8 +354,12 @@ void apply_config(const ConfigTree &cfg) {
 
 		// User's overrides and hacks
 		_GP(usetup).override_multitasking = CfgReadInt(cfg, "override", "multitasking", -1);
-		String override_os = CfgReadString(cfg, "override", "os");
 		_GP(usetup).override_script_os = -1;
+		// Looks for the existence of the Linux executable
+		if (File::IsFile(Path::ConcatPaths(_GP(usetup).startup_dir, "ags64"))) {
+			_GP(usetup).override_script_os = eOS_Linux;
+		}
+		String override_os = CfgReadString(cfg, "override", "os");
 		if (override_os.CompareNoCase("dos") == 0) {
 			_GP(usetup).override_script_os = eOS_DOS;
 		} else if (override_os.CompareNoCase("win") == 0) {




More information about the Scummvm-git-logs mailing list