[Scummvm-git-logs] scummvm master -> 0caa469e095c27dc1ed55b8b537882c57ddb649d

sev- noreply at scummvm.org
Wed Jan 18 23:06:29 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:
0caa469e09 DIRECTOR: set dirseparator on windows platforms: \


Commit: 0caa469e095c27dc1ed55b8b537882c57ddb649d
    https://github.com/scummvm/scummvm/commit/0caa469e095c27dc1ed55b8b537882c57ddb649d
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2023-01-19T00:06:25+01:00

Commit Message:
DIRECTOR: set dirseparator on windows platforms: \

Director 4 and later games for windows use filepaths where '\' is the separator.
Games for mac use ':', which was the default.
Director 3 and earlier games were authored on Mac and thus use the ':'
internally.

This fixes a bug where the filename for c:\fileio.dll was parsed
to \fileio.dll. Due to the default ':' everything after the ':' was
seen as the filename.

Changed paths:
    engines/director/director.cpp


diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index 9c3c7ce8273..dc95fc2d3bf 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -56,7 +56,13 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam
 	g_debugger = new Debugger();
 	setDebugger(g_debugger);
 
-	_dirSeparator = ':';
+	// parseOptions depends on the _dirSeparator
+	_version = getDescriptionVersion();
+	if (getPlatform() == Common::kPlatformWindows && _version >= 400) {
+		_dirSeparator = '\\';
+	} else {
+		_dirSeparator = ':';
+	}
 
 	parseOptions();
 
@@ -82,7 +88,6 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam
 	_cursorWindow = nullptr;
 	_lingo = nullptr;
 	_clipBoard = nullptr;
-	_version = getDescriptionVersion();
 	_fixStageSize = false;
 	_fixStageRect = Common::Rect();
 	_wmMode = 0;




More information about the Scummvm-git-logs mailing list