Skip to content

Commit

Permalink
Add advanced login option to start without plugins
Browse files Browse the repository at this point in the history
Feature parity with XIVLauncher WPF.

Adds an option to run the game with Dalamud, but without any plugins.

I only briefly tested this on windows, and xlcore had some other display issues in terms of some imgui tabs, but Dalamud did launch/inject as intended correctly.

This would be best tested on someone's Linux machine to ensure all advanced options continue to work as intended.
  • Loading branch information
reiichi001 committed Dec 3, 2024
1 parent a39a6b5 commit 043bc8f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
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

0 comments on commit 043bc8f

Please sign in to comment.