mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
Random fixes
This commit is contained in:
@@ -30,19 +30,24 @@ namespace VRCX
|
||||
_steamPath = Path.Join(_homeDirectory, ".local/share/Steam");
|
||||
|
||||
var flatpakSteamPath = Path.Join(_homeDirectory, ".var/app/com.valvesoftware.Steam/.local/share/Steam");
|
||||
if (!Directory.Exists(_steamPath) && Directory.Exists(flatpakSteamPath))
|
||||
if (!IsValidSteamPath(_steamPath) && IsValidSteamPath(flatpakSteamPath))
|
||||
{
|
||||
logger.Info("Flatpak Steam detected.");
|
||||
_steamPath = flatpakSteamPath;
|
||||
}
|
||||
|
||||
var legacySteamPath = Path.Join(_homeDirectory, ".steam/steam");
|
||||
if (!Directory.Exists(_steamPath) && Directory.Exists(legacySteamPath))
|
||||
if (!IsValidSteamPath(_steamPath) && IsValidSteamPath(legacySteamPath))
|
||||
{
|
||||
logger.Info("Legacy Steam path detected.");
|
||||
_steamPath = legacySteamPath;
|
||||
}
|
||||
|
||||
if (!IsValidSteamPath(_steamPath))
|
||||
{
|
||||
logger.Error("No valid Steam library found.");
|
||||
}
|
||||
|
||||
var libraryFoldersVdfPath = Path.Join(_steamPath, "config/libraryfolders.vdf");
|
||||
var vrcLibraryPath = GetLibraryWithAppId(libraryFoldersVdfPath, vrchatAppid);
|
||||
if (string.IsNullOrEmpty(vrcLibraryPath))
|
||||
@@ -55,6 +60,11 @@ namespace VRCX
|
||||
_vrcAppDataPath = Path.Join(_vrcPrefixPath, "drive_c/users/steamuser/AppData/LocalLow/VRChat/VRChat");
|
||||
_vrcCrashesPath = Path.Join(_vrcPrefixPath, "drive_c/users/steamuser/AppData/Local/Temp/VRChat/VRChat/Crashes");
|
||||
}
|
||||
|
||||
private static bool IsValidSteamPath(string path)
|
||||
{
|
||||
return File.Exists(Path.Join(path, "config/libraryfolders.vdf"));
|
||||
}
|
||||
|
||||
private static string? GetLibraryWithAppId(string libraryFoldersVdfPath, string appId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user