mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Fixed missing more than one steam library
The steam library code didn't handle multiple steam library locations properly, but now it does!
This commit is contained in:
parent
07d1c040cb
commit
706c225dc7
@ -456,19 +456,17 @@ namespace HeliosPlus.GameLibraries
|
|||||||
// There may be multiple so we need to check the whole file
|
// There may be multiple so we need to check the whole file
|
||||||
Regex steamLibrariesRegex = new Regex(@"""BaseInstallFolder_\d+""\s+""(.*)""", RegexOptions.IgnoreCase);
|
Regex steamLibrariesRegex = new Regex(@"""BaseInstallFolder_\d+""\s+""(.*)""", RegexOptions.IgnoreCase);
|
||||||
// Try to match all lines against the Regex.
|
// Try to match all lines against the Regex.
|
||||||
Match steamLibrariesMatches = steamLibrariesRegex.Match(steamConfigVdfText);
|
MatchCollection steamLibrariesMatches = steamLibrariesRegex.Matches(steamConfigVdfText);
|
||||||
// If at least one of them matched!
|
// If at least one of them matched!
|
||||||
if (steamLibrariesMatches.Success)
|
foreach (Match steamLibraryMatch in steamLibrariesMatches)
|
||||||
{
|
{
|
||||||
// Loop throug the results and add to an array
|
if (steamLibraryMatch.Success)
|
||||||
for (int i = 1; i < steamLibrariesMatches.Groups.Count; i++)
|
|
||||||
{
|
{
|
||||||
string steamLibraryPath = Regex.Unescape(steamLibrariesMatches.Groups[i].Value);
|
string steamLibraryPath = Regex.Unescape(steamLibraryMatch.Groups[1].Value);
|
||||||
Console.WriteLine($"Found steam library: {steamLibraryPath}");
|
Console.WriteLine($"Found steam library: {steamLibraryPath}");
|
||||||
steamLibrariesPaths.Add(steamLibraryPath);
|
steamLibrariesPaths.Add(steamLibraryPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now we go off and find the details for the games in each Steam Library
|
// Now we go off and find the details for the games in each Steam Library
|
||||||
foreach (string steamLibraryPath in steamLibrariesPaths)
|
foreach (string steamLibraryPath in steamLibrariesPaths)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user