8000 Added option to ignore steam (Just skips the initialise calls if true) by CodeAndGin · Pull Request #19 · goatcorp/XIVLauncher.Core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added option to ignore steam (Just skips the initialise calls if true) #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class SettingsTabGame : SettingsTab
new SettingsEntry<DpiAwareness>("Game DPI Awareness", "Select the game's DPI Awareness. Change this if the game's scaling looks wrong.", () => Program.Config.DpiAwareness ?? DpiAwareness.Unaware, x => Program.Config.DpiAwareness = x),
new SettingsEntry<bool>("Free trial account", "Check this if you are using a free trial account.", () => Program.Config.IsFt ?? false, x => Program.Config.IsFt = x),
new SettingsEntry<bool>("Use XIVLauncher authenticator/OTP macros", "Check this if you want to use the XIVLauncher authenticator app or macros.", () => Program.Config.IsOtpServer ?? false, x => Program.Config.IsOtpServer = x),
new SettingsEntry<bool>("Ignore Steam", "Check this if you do not want XIVLauncher to communicate with Steam (Requires Restart).", () => Program.Config.IsIgnoringSteam ?? false, x => Program.Config.IsIgnoringSteam = x),
};

public override string Title => "Game";
Expand Down
2 changes: 2 additions & 0 deletions src/XIVLauncher.Core/Configuration/ILauncherConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public interface ILauncherConfig

public bool? IsOtpServer { get; set; }

public bool? IsIgnoringSteam { get; set; }

#region Patching

public DirectoryInfo? PatchPath { get; set; }
Expand Down
21 changes: 12 additions & 9 deletions src/XIVLauncher.Core/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ private static void LoadConfig(Storage storage)
Config.IsEncryptArgs ??= true;
Config.IsFt ??= false;
Config.IsOtpServer ??= false;
Config.IsIgnoringSteam ??= false;

Config.PatchPath ??= storage.GetFolder("patch");
Config.PatchAcquisitionMethod ??= AcquisitionMethod.Aria;
Expand Down Expand Up @@ -144,16 +145,18 @@ private static void Main(string[] args)
8DC1 default:
throw new PlatformNotSupportedException();
}

try
{
var appId = Config.IsFt == true ? STEAM_APP_ID_FT : STEAM_APP_ID;
Steam.Initialize(appId);
}
catch (Exception ex)
if (!Config.IsIgnoringSteam ?? true)
{
Log.Error(ex, "Couldn't init Steam with game AppIds, trying FT");
Steam.Initialize(STEAM_APP_ID_FT);
try
{
var appId = Config.IsFt == true ? STEAM_APP_ID_FT : STEAM_APP_ID;
Steam.Initialize(appId);
}
catch (Exception ex)
{
Log.Error(ex, "Couldn't init Steam with game AppIds, trying FT");
Steam.Initialize(STEAM_APP_ID_FT);
}
}
}
catch (Exception ex)
Expand Down
0