diff --git a/engines/director/lingo/xlibs/movemousexobj.cpp b/engines/director/lingo/xlibs/movemousexobj.cpp index a8d35ed3c383..63c051e19219 100644 --- a/engines/director/lingo/xlibs/movemousexobj.cpp +++ b/engines/director/lingo/xlibs/movemousexobj.cpp @@ -34,6 +34,7 @@ namespace Director { const char *MoveMouseXObj::xlibName = "MoveMouse"; const char *MoveMouseXObj::fileNames[] = { "MoveMouse", + "MoveMouse.XObj", "MOVEWIN", 0 }; diff --git a/engines/director/util.cpp b/engines/director/util.cpp index c9a7916c13e7..1960f05a785a 100644 --- a/engines/director/util.cpp +++ b/engines/director/util.cpp @@ -510,28 +510,28 @@ Common::String pathMakeRelative(Common::String path, bool recursive, bool addext // Let's try to translate file path into 8.3 format Common::String addedexts; - if (g_director->getPlatform() == Common::kPlatformWindows && g_director->getVersion() < 500) { - convPath.clear(); - const char *ptr = initialPath.c_str(); - Common::String component; - - while (*ptr) { - if (*ptr == g_director->_dirSeparator) { - if (component.equals(".")) { - convPath += component; - } else { - convPath += convertMacFilename(component.c_str()); - } - - component.clear(); - convPath += g_director->_dirSeparator; + convPath.clear(); + const char *ptr = initialPath.c_str(); + Common::String component; + + while (*ptr) { + if (*ptr == g_director->_dirSeparator) { + if (component.equals(".")) { + convPath += component; } else { - component += *ptr; + convPath += convertMacFilename(component.c_str()); } - ptr++; + component.clear(); + convPath += g_director->_dirSeparator; + } else { + component += *ptr; } + ptr++; + } + + if (g_director->getPlatform() == Common::kPlatformWindows) { if (hasExtension(component)) { Common::String nameWithoutExt = component.substr(0, component.size() - 4); Common::String ext = component.substr(component.size() - 4); @@ -543,14 +543,11 @@ Common::String pathMakeRelative(Common::String path, bool recursive, bool addext if (testPath(res)) return res; } - - if (addexts) - addedexts = testExtensions(component, initialPath, convPath); - } else { - if (addexts) - addedexts = testExtensions(initialPath, initialPath, convPath); } + if (addexts) + addedexts = testExtensions(component, initialPath, convPath); + if (!addedexts.empty()) { return addedexts; }