Skip to content

Commit

Permalink
Separate settings for each profile
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanpmartell committed Aug 29, 2024
1 parent 11ae7da commit 6d6b9f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion LittleWarGameClient/Handlers/SettingsHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace LittleWarGameClient.Handlers
{
internal class SettingsHandler
{
private const string fileName = "Settings.ini";
private readonly string fileName;
private const int defaultWidth = 1280;
private const int defaultHeight = 720;
private const bool defaultFullscreen = false;
Expand All @@ -22,6 +22,10 @@ internal class SettingsHandler

public SettingsHandler()
{
var settingsDirectory = "settings";
if (!Directory.Exists(settingsDirectory))
Directory.CreateDirectory(settingsDirectory);
fileName = Path.Join(settingsDirectory, $"{GameForm.InstanceName}.ini");
if (!File.Exists(fileName))
settings = CreateDefaultIniFile();
else
Expand Down

0 comments on commit 6d6b9f3

Please sign in to comment.