mirror of https://github.com/OpenRCT2/OpenRCT2.git
Update Steam path detection for Linux (#21948)
* Update Steam path detection for Linux As Steam now uses Proton to install Windows version natively, update paths so they get found automatically * Use new Steam path detection on Linux only This restores Steam path detection on macOS as it doesn't have Proton
This commit is contained in:
parent
9f69b532b1
commit
4e8f578075
|
@ -151,6 +151,16 @@ namespace Platform
|
|||
return {};
|
||||
}
|
||||
|
||||
u8string GetRCT1SteamDir()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
u8string GetRCT2SteamDir()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
# ifndef NO_TTF
|
||||
std::string GetFontPath(const TTFFontDescriptor& font)
|
||||
{
|
||||
|
|
|
@ -299,7 +299,15 @@ namespace Platform
|
|||
return {};
|
||||
}
|
||||
|
||||
auto steamPath = Path::Combine(homeDir, u8".local/share/Steam/ubuntu12_32/steamapps/content");
|
||||
// Prefer new path for Steam, which is the default when using with Proton
|
||||
auto steamPath = Path::Combine(homeDir, u8".local/share/Steam/steamapps/common");
|
||||
if (Path::DirectoryExists(steamPath))
|
||||
{
|
||||
return steamPath;
|
||||
}
|
||||
|
||||
// Fallback paths
|
||||
steamPath = Path::Combine(homeDir, u8".local/share/Steam/ubuntu12_32/steamapps/content");
|
||||
if (Path::DirectoryExists(steamPath))
|
||||
{
|
||||
return steamPath;
|
||||
|
@ -310,10 +318,19 @@ namespace Platform
|
|||
{
|
||||
return steamPath;
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
u8string GetRCT1SteamDir()
|
||||
{
|
||||
return u8"Rollercoaster Tycoon Deluxe";
|
||||
}
|
||||
|
||||
u8string GetRCT2SteamDir()
|
||||
{
|
||||
return u8"Rollercoaster Tycoon 2";
|
||||
}
|
||||
|
||||
# ifndef NO_TTF
|
||||
std::string GetFontPath(const TTFFontDescriptor& font)
|
||||
{
|
||||
|
|
|
@ -369,17 +369,6 @@ namespace Platform
|
|||
datetime64 utcNow = epochAsTicks + utcEpochTicks;
|
||||
return utcNow;
|
||||
}
|
||||
|
||||
u8string GetRCT1SteamDir()
|
||||
{
|
||||
return u8"app_285310" PATH_SEPARATOR u8"depot_285311";
|
||||
}
|
||||
|
||||
u8string GetRCT2SteamDir()
|
||||
{
|
||||
return u8"app_285330" PATH_SEPARATOR u8"depot_285331";
|
||||
}
|
||||
|
||||
} // namespace Platform
|
||||
|
||||
#endif
|
||||
|
|
|
@ -252,6 +252,16 @@ namespace Platform
|
|||
return {};
|
||||
}
|
||||
|
||||
u8string GetRCT1SteamDir()
|
||||
{
|
||||
return u8"app_285310" PATH_SEPARATOR u8"depot_285311";
|
||||
}
|
||||
|
||||
u8string GetRCT2SteamDir()
|
||||
{
|
||||
return u8"app_285330" PATH_SEPARATOR u8"depot_285331";
|
||||
}
|
||||
|
||||
std::string GetFontPath(const TTFFontDescriptor& font)
|
||||
{
|
||||
@autoreleasepool
|
||||
|
|
Loading…
Reference in New Issue