Skip to content
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

Add advanced login option to start without plugins #204

Merged
merged 1 commit into from
Dec 3, 2024
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
1 change: 1 addition & 0 deletions src/XIVLauncher.Core/Components/MainPage/LoginAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ public enum LoginAction
{
Game,
GameNoDalamud,
GameNoPlugins,
GameNoThirdparty,
GameNoLaunch,
Repair,
Expand Down
7 changes: 7 additions & 0 deletions src/XIVLauncher.Core/Components/MainPage/LoginFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ public override void Draw()

ImGui.Separator();

if (ImGui.MenuItem("Launch without any plugins"))
{
this.OnLogin?.Invoke(LoginAction.GameNoPlugins);
}

ImGui.Separator();

if (ImGui.MenuItem("Launch without custom repo plugins"))
{
this.OnLogin?.Invoke(LoginAction.GameNoThirdparty);
Expand Down
6 changes: 3 additions & 3 deletions src/XIVLauncher.Core/Components/MainPage/MainPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ private async Task<bool> TryProcessLoginResult(Launcher.LoginResult loginResult,

try
{
using var process = await StartGameAndAddon(loginResult, isSteam, action == LoginAction.GameNoDalamud, action == LoginAction.GameNoThirdparty).ConfigureAwait(false);
using var process = await StartGameAndAddon(loginResult, isSteam, action == LoginAction.GameNoDalamud, action == LoginAction.GameNoPlugins, action == LoginAction.GameNoThirdparty).ConfigureAwait(false);

if (process is null)
throw new InvalidOperationException("Could not obtain Process Handle");
Expand Down Expand Up @@ -592,7 +592,7 @@ private async Task<bool> TryProcessLoginResult(Launcher.LoginResult loginResult,
}
}

public async Task<Process> StartGameAndAddon(Launcher.LoginResult loginResult, bool isSteam, bool forceNoDalamud, bool noThird)
public async Task<Process> StartGameAndAddon(Launcher.LoginResult loginResult, bool isSteam, bool forceNoDalamud, bool noPlugins , bool noThird)
{
var dalamudOk = false;

Expand Down Expand Up @@ -620,7 +620,7 @@ public async Task<Process> StartGameAndAddon(Launcher.LoginResult loginResult, b
var dalamudLauncher = new DalamudLauncher(dalamudRunner, Program.DalamudUpdater,
App.Settings.DalamudLoadMethod.GetValueOrDefault(DalamudLoadMethod.DllInject), App.Settings.GamePath,
App.Storage.Root, App.Storage.GetFolder("logs"), App.Settings.ClientLanguage ?? ClientLanguage.English,
App.Settings.DalamudLoadDelay, false, false, noThird, Troubleshooting.GetTroubleshootingJson());
App.Settings.DalamudLoadDelay, false, noPlugins, noThird, Troubleshooting.GetTroubleshootingJson());

try
{
Expand Down
Loading