From 043bc8f6eda59e509dd6c81ae00429e4b144e706 Mon Sep 17 00:00:00 2001 From: Robert Baker Date: Tue, 3 Dec 2024 12:13:57 -0800 Subject: [PATCH] Add advanced login option to start without plugins 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. --- src/XIVLauncher.Core/Components/MainPage/LoginAction.cs | 1 + src/XIVLauncher.Core/Components/MainPage/LoginFrame.cs | 7 +++++++ src/XIVLauncher.Core/Components/MainPage/MainPage.cs | 6 +++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/XIVLauncher.Core/Components/MainPage/LoginAction.cs b/src/XIVLauncher.Core/Components/MainPage/LoginAction.cs index 959e9275..b788c689 100644 --- a/src/XIVLauncher.Core/Components/MainPage/LoginAction.cs +++ b/src/XIVLauncher.Core/Components/MainPage/LoginAction.cs @@ -4,6 +4,7 @@ public enum LoginAction { Game, GameNoDalamud, + GameNoPlugins, GameNoThirdparty, GameNoLaunch, Repair, diff --git a/src/XIVLauncher.Core/Components/MainPage/LoginFrame.cs b/src/XIVLauncher.Core/Components/MainPage/LoginFrame.cs index 795b3868..36a19436 100644 --- a/src/XIVLauncher.Core/Components/MainPage/LoginFrame.cs +++ b/src/XIVLauncher.Core/Components/MainPage/LoginFrame.cs @@ -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); diff --git a/src/XIVLauncher.Core/Components/MainPage/MainPage.cs b/src/XIVLauncher.Core/Components/MainPage/MainPage.cs index 9a5a5ed7..3f38be7f 100644 --- a/src/XIVLauncher.Core/Components/MainPage/MainPage.cs +++ b/src/XIVLauncher.Core/Components/MainPage/MainPage.cs @@ -369,7 +369,7 @@ private async Task 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"); @@ -592,7 +592,7 @@ private async Task TryProcessLoginResult(Launcher.LoginResult loginResult, } } - public async Task StartGameAndAddon(Launcher.LoginResult loginResult, bool isSteam, bool forceNoDalamud, bool noThird) + public async Task StartGameAndAddon(Launcher.LoginResult loginResult, bool isSteam, bool forceNoDalamud, bool noPlugins , bool noThird) { var dalamudOk = false; @@ -620,7 +620,7 @@ public async Task 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 {