MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / autoDetectLocoInstallPath

Function autoDetectLocoInstallPath

src/OpenLoco/src/Environment.cpp:53–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 }
52
53 static fs::path autoDetectLocoInstallPath()
54 {
55 static constexpr const char* kSearchPaths[] = {
56 "C:/Program Files (x86)/Atari/Locomotion",
57 "C:/GOG Games/Chris Sawyer's Locomotion",
58 "C:/GOG Games/Locomotion",
59 "C:/Program Files/Steam/steamapps/common/Locomotion",
60 "C:/Program Files (x86)/Steam/steamapps/common/Locomotion",
61 };
62
63 Logging::info("Searching for Locomotion install path...");
64 for (auto path : kSearchPaths)
65 {
66 if (validateLocoInstallPath(path))
67 {
68 Logging::info(" found: {}", path);
69 return path;
70 }
71 }
72 return fs::path();
73 }
74
75 static fs::path resolveLocoInstallPath()
76 {

Callers 1

resolveLocoInstallPathFunction · 0.85

Calls 2

infoFunction · 0.85
validateLocoInstallPathFunction · 0.85

Tested by

no test coverage detected