Skip to content

Commit

Permalink
Merge pull request #204 from reiichi001/add_start_without_plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
reiichi001 authored Dec 3, 2024
2 parents a39a6b5 + 043bc8f commit 4fbcce1
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 4fbcce1

Please sign in to comment.