added OverrideMods argument for headless ryujinx

This commit is contained in:
simon 2025-01-06 23:19:43 +01:00
parent 8827bce223
commit dcd19facff
2 changed files with 57 additions and 50 deletions

View file

@ -1,6 +1,7 @@
using CommandLine; using CommandLine;
using Gommon; using Gommon;
using Ryujinx.Ava; using Ryujinx.Ava;
using Ryujinx.Ava.Utilities;
using Ryujinx.Ava.Utilities.Configuration; using Ryujinx.Ava.Utilities.Configuration;
using Ryujinx.Common; using Ryujinx.Common;
using Ryujinx.Common.Configuration; using Ryujinx.Common.Configuration;
@ -147,7 +148,7 @@ namespace Ryujinx.Headless
option.InheritMainConfig(originalArgs, ConfigurationState.Instance, out useLastUsedProfile); option.InheritMainConfig(originalArgs, ConfigurationState.Instance, out useLastUsedProfile);
} }
AppDataManager.Initialize(option.BaseDataDir, []); AppDataManager.Initialize(option.BaseDataDir, option.OverrideMods.Split(","));
if (useLastUsedProfile && AccountSaveDataManager.GetLastUsedUser().TryGet(out var profile)) if (useLastUsedProfile && AccountSaveDataManager.GetLastUsedUser().TryGet(out var profile))
option.UserProfile = profile.Name; option.UserProfile = profile.Name;

View file

@ -420,5 +420,11 @@ namespace Ryujinx.Headless
public string InputPath { get; set; } public string InputPath { get; set; }
public SafeDictionary<PlayerIndex, InputConfig> InheritedInputConfigs = new(); public SafeDictionary<PlayerIndex, InputConfig> InheritedInputConfigs = new();
// Mod
[Option('m', "mod", Required = false, Default = "", HelpText = "Overrides enabled mods with user input (Format: \"mod1\",\"mod2\").")]
public string OverrideMods { get; set; }
} }
} }