Skip to content

Commit

Permalink
Switched ListFPSConfigs() public static method of the ConfigManager c…
Browse files Browse the repository at this point in the history
…lass to FindFiles() use.
  • Loading branch information
xvitaly committed Sep 6, 2024
1 parent de16032 commit 0e54fd0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/corelib/ConfigManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ public List<string> ConfigNames
public string FPSConfigInstallPath { get; private set; }

/// <summary>
/// Get list of common FPS-config paths installation.
/// Gets the list of installed FPS-configs.
/// </summary>
/// <param name="GamePath">Game installation directory.</param>
/// <param name="UserDir">If game use custom user directories for custom stuff.</param>
/// <returns>List of common FPS-config paths.</returns>
public static List<string> ListFPSConfigs(string GamePath, bool UserDir)
{
List<string> Result = new List<string> { Path.Combine(GamePath, "cfg", "autoexec.cfg") };
if (UserDir) { Result.Add(Path.Combine(GamePath, "custom", "autoexec.cfg")); }
return Result;
List<string> ConfigDirs = new List<string> { Path.Combine(GamePath, "cfg") };
if (UserDir) { ConfigDirs.Add(Path.Combine(GamePath, "custom")); }
return FileManager.FindFiles(ConfigDirs, "autoexec.cfg");
}

/// <summary>
Expand Down

0 comments on commit 0e54fd0

Please sign in to comment.