mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-04-21 18:13:14 +02:00
Compare commits
6 commits
97c675d6d5
...
abe26c9109
Author | SHA1 | Date | |
---|---|---|---|
![]() |
abe26c9109 | ||
![]() |
e7d3f39c1b | ||
![]() |
2f064064ca | ||
![]() |
cf0408f137 | ||
![]() |
8a4f9a9cab | ||
![]() |
c5ec10b779 |
11 changed files with 129 additions and 16 deletions
|
@ -1,8 +1,10 @@
|
|||
using Gommon;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.HLE.Exceptions;
|
||||
using Ryujinx.HLE.HOS.Ipc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
@ -21,22 +23,43 @@ namespace Ryujinx.HLE.HOS.Services
|
|||
private int _selfId;
|
||||
private bool _isDomain;
|
||||
|
||||
public IpcService(ServerBase server = null)
|
||||
public IpcService(ServerBase server = null, bool registerTipc = false)
|
||||
{
|
||||
CmifCommands = GetType().Assembly.GetTypes()
|
||||
.Where(type => type == GetType())
|
||||
.SelectMany(type => type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public))
|
||||
Stopwatch sw = Stopwatch.StartNew();
|
||||
|
||||
CmifCommands = GetType()
|
||||
.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public)
|
||||
.SelectMany(methodInfo => methodInfo.GetCustomAttributes<CommandCmifAttribute>()
|
||||
.Select(command => (command.Id, methodInfo)))
|
||||
.ToDictionary(command => command.Id, command => command.methodInfo);
|
||||
|
||||
sw.Stop();
|
||||
|
||||
Logger.Debug?.Print(
|
||||
LogClass.Emulation,
|
||||
$"{CmifCommands.Count} Cmif commands loaded in {sw.ElapsedTicks} ticks ({Stopwatch.Frequency} tps).",
|
||||
GetType().AsPrettyString()
|
||||
);
|
||||
|
||||
TipcCommands = GetType().Assembly.GetTypes()
|
||||
.Where(type => type == GetType())
|
||||
.SelectMany(type => type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public))
|
||||
.SelectMany(methodInfo => methodInfo.GetCustomAttributes<CommandTipcAttribute>()
|
||||
.Select(command => (command.Id, methodInfo)))
|
||||
.ToDictionary(command => command.Id, command => command.methodInfo);
|
||||
if (registerTipc)
|
||||
{
|
||||
sw.Start();
|
||||
|
||||
TipcCommands = GetType()
|
||||
.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public)
|
||||
.SelectMany(methodInfo => methodInfo.GetCustomAttributes<CommandTipcAttribute>()
|
||||
.Select(command => (command.Id, methodInfo)))
|
||||
.ToDictionary(command => command.Id, command => command.methodInfo);
|
||||
|
||||
sw.Stop();
|
||||
|
||||
Logger.Debug?.Print(
|
||||
LogClass.Emulation,
|
||||
$"{TipcCommands.Count} Tipc commands loaded in {sw.ElapsedTicks} ticks ({Stopwatch.Frequency} tps).",
|
||||
GetType().AsPrettyString()
|
||||
);
|
||||
}
|
||||
|
||||
Server = server;
|
||||
|
||||
_parent = this;
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace Ryujinx.HLE.HOS.Services.Sm
|
|||
|
||||
private bool _isInitialized;
|
||||
|
||||
public IUserInterface(KernelContext context, SmRegistry registry)
|
||||
public IUserInterface(KernelContext context, SmRegistry registry) : base(registerTipc: true)
|
||||
{
|
||||
_commonServer = new ServerBase(context, "CommonServer");
|
||||
_registry = registry;
|
||||
|
|
|
@ -5297,6 +5297,31 @@
|
|||
"zh_TW": "忽略控制器小程式"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "SettingsTabSystemSkipUserProfilesManager",
|
||||
"Translations": {
|
||||
"ar_SA": "",
|
||||
"de_DE": "",
|
||||
"el_GR": "",
|
||||
"en_US": "Skip dialog 'User Profiles Manager'",
|
||||
"es_ES": "",
|
||||
"fr_FR": "",
|
||||
"he_IL": "",
|
||||
"it_IT": "",
|
||||
"ja_JP": "",
|
||||
"ko_KR": "",
|
||||
"no_NO": "",
|
||||
"pl_PL": "",
|
||||
"pt_BR": "",
|
||||
"ru_RU": "",
|
||||
"sv_SE": "",
|
||||
"th_TH": "",
|
||||
"tr_TR": "",
|
||||
"uk_UA": "",
|
||||
"zh_CN": "",
|
||||
"zh_TW": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "SettingsTabGraphics",
|
||||
"Translations": {
|
||||
|
@ -16697,6 +16722,31 @@
|
|||
"zh_TW": "在模擬應用程式時如果遊戲手柄中斷連線則不會顯示控制器小程式。\n\n如果不確定,請保持關閉狀態。"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "SkipUserProfilesTooltip",
|
||||
"Translations": {
|
||||
"ar_SA": "",
|
||||
"de_DE": "",
|
||||
"el_GR": "",
|
||||
"en_US": "This option skips the 'User Profile Manager' dialog during gameplay, using a pre-selected profile.\n\nProfile switching is found in 'Options' - 'Manager User Profiles'. Select the desired profile before loading the game.",
|
||||
"es_ES": "",
|
||||
"fr_FR": "",
|
||||
"he_IL": "",
|
||||
"it_IT": "",
|
||||
"ja_JP": "",
|
||||
"ko_KR": "",
|
||||
"no_NO": "",
|
||||
"pl_PL": "",
|
||||
"pt_BR": "",
|
||||
"ru_RU": "",
|
||||
"sv_SE": "",
|
||||
"th_TH": "",
|
||||
"tr_TR": "",
|
||||
"uk_UA": "",
|
||||
"zh_CN": "",
|
||||
"zh_TW": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"ID": "GraphicsBackendThreadingTooltip",
|
||||
"Translations": {
|
||||
|
|
|
@ -150,7 +150,10 @@ namespace Ryujinx.Headless
|
|||
|
||||
if (NeedsOverride(nameof(IgnoreControllerApplet)))
|
||||
IgnoreControllerApplet = configurationState.System.IgnoreControllerApplet;
|
||||
|
||||
|
||||
if (NeedsOverride(nameof(SkipUserProfilesManager)))
|
||||
SkipUserProfilesManager = configurationState.System.SkipUserProfilesManager;
|
||||
|
||||
return;
|
||||
|
||||
bool NeedsOverride(string argKey) => originalArgs.None(arg => arg.TrimStart('-').EqualsIgnoreCase(OptionName(argKey)));
|
||||
|
@ -414,6 +417,9 @@ namespace Ryujinx.Headless
|
|||
[Option("ignore-controller-applet", Required = false, Default = false, HelpText = "Enable ignoring the controller applet when your game loses connection to your controller.")]
|
||||
public bool IgnoreControllerApplet { get; set; }
|
||||
|
||||
[Option("skip-User-Profiles-Manager", Required = false, Default = false, HelpText = "Enable...")]
|
||||
public bool SkipUserProfilesManager { get; set; }
|
||||
|
||||
// Values
|
||||
|
||||
[Value(0, MetaName = "input", HelpText = "Input to load.", Required = true)]
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Ryujinx.Ava.Systems.Configuration
|
|||
/// <summary>
|
||||
/// The current version of the file format
|
||||
/// </summary>
|
||||
public const int CurrentVersion = 68;
|
||||
public const int CurrentVersion = 69;
|
||||
|
||||
/// <summary>
|
||||
/// Version of the configuration file format
|
||||
|
@ -187,6 +187,11 @@ namespace Ryujinx.Ava.Systems.Configuration
|
|||
/// </summary>
|
||||
public bool IgnoreApplet { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Skip user profiles manager dialog during gameplay(the used profile in the configuration will be selected)
|
||||
/// </summary>
|
||||
public bool SkipUserProfiles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Enables or disables save window size, position and state on close.
|
||||
/// </summary>
|
||||
|
|
|
@ -102,6 +102,7 @@ namespace Ryujinx.Ava.Systems.Configuration
|
|||
System.DramSize.Value = cff.DramSize;
|
||||
System.IgnoreMissingServices.Value = cff.IgnoreMissingServices;
|
||||
System.IgnoreControllerApplet.Value = cff.IgnoreApplet;
|
||||
System.SkipUserProfilesManager.Value = cff.SkipUserProfiles;
|
||||
System.UseHypervisor.Value = cff.UseHypervisor;
|
||||
|
||||
UI.GuiColumns.FavColumn.Value = shouldLoadFromFile ? cff.GuiColumns.FavColumn : UI.GuiColumns.FavColumn.Value;
|
||||
|
@ -438,9 +439,12 @@ namespace Ryujinx.Ava.Systems.Configuration
|
|||
(64, static cff => cff.LoggingEnableAvalonia = false),
|
||||
(65, static cff => cff.UpdateCheckerType = cff.CheckUpdatesOnStart ? UpdaterType.PromptAtStartup : UpdaterType.Off),
|
||||
(66, static cff => cff.DisableInputWhenOutOfFocus = false),
|
||||
(67, static cff => cff.FocusLostActionType = cff.DisableInputWhenOutOfFocus ? FocusLostType.BlockInput : FocusLostType.DoNothing)
|
||||
// 68 was the version that added per-game configs; the file structure did not change
|
||||
// the version was increased so external tools could know that your Ryujinx version has per-game config capabilities.
|
||||
(67, static cff => cff.FocusLostActionType = cff.DisableInputWhenOutOfFocus ? FocusLostType.BlockInput : FocusLostType.DoNothing),
|
||||
|
||||
// 68 was the version that added per-game configs; the file structure did not change
|
||||
// the version was increased so external tools could know that your Ryujinx version has per-game config capabilities.
|
||||
(69, static cff => cff.SkipUserProfiles = false)
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -390,6 +390,11 @@ namespace Ryujinx.Ava.Systems.Configuration
|
|||
/// </summary>
|
||||
public ReactiveObject<bool> IgnoreControllerApplet { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Skip User Profiles Manager
|
||||
/// </summary>
|
||||
public ReactiveObject<bool> SkipUserProfilesManager { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Uses Hypervisor over JIT if available
|
||||
/// </summary>
|
||||
|
@ -431,6 +436,8 @@ namespace Ryujinx.Ava.Systems.Configuration
|
|||
IgnoreMissingServices.LogChangesToValue(nameof(IgnoreMissingServices));
|
||||
IgnoreControllerApplet = new ReactiveObject<bool>();
|
||||
IgnoreControllerApplet.LogChangesToValue(nameof(IgnoreControllerApplet));
|
||||
SkipUserProfilesManager = new ReactiveObject<bool>();
|
||||
SkipUserProfilesManager.LogChangesToValue(nameof(SkipUserProfilesManager));
|
||||
AudioVolume = new ReactiveObject<float>();
|
||||
AudioVolume.LogChangesToValue(nameof(AudioVolume));
|
||||
UseHypervisor = new ReactiveObject<bool>();
|
||||
|
|
|
@ -81,6 +81,7 @@ namespace Ryujinx.Ava.Systems.Configuration
|
|||
DramSize = System.DramSize,
|
||||
IgnoreMissingServices = System.IgnoreMissingServices,
|
||||
IgnoreApplet = System.IgnoreControllerApplet,
|
||||
SkipUserProfiles = System.SkipUserProfilesManager,
|
||||
UseHypervisor = System.UseHypervisor,
|
||||
GuiColumns = new GuiColumns
|
||||
{
|
||||
|
@ -205,6 +206,7 @@ namespace Ryujinx.Ava.Systems.Configuration
|
|||
System.DramSize.Value = MemoryConfiguration.MemoryConfiguration4GiB;
|
||||
System.IgnoreMissingServices.Value = false;
|
||||
System.IgnoreControllerApplet.Value = false;
|
||||
System.SkipUserProfilesManager.Value = false;
|
||||
System.UseHypervisor.Value = true;
|
||||
Multiplayer.LanInterfaceId.Value = "0";
|
||||
Multiplayer.Mode.Value = MultiplayerMode.Disabled;
|
||||
|
|
|
@ -3,6 +3,7 @@ using Avalonia.Controls;
|
|||
using Avalonia.Input;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Ava.Systems.Configuration;
|
||||
using Ryujinx.Ava.UI.Controls;
|
||||
using Ryujinx.Ava.UI.Helpers;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
|
@ -78,6 +79,13 @@ namespace Ryujinx.Ava.UI.Applet
|
|||
|
||||
public static async Task<(UserId Id, bool Result)> ShowInputDialog(ProfileSelectorDialogViewModel viewModel)
|
||||
{
|
||||
|
||||
if (ConfigurationState.Instance.System.SkipUserProfilesManager)
|
||||
{
|
||||
UserId defaultId = viewModel.SelectedUserId;
|
||||
return (defaultId, true);
|
||||
}
|
||||
|
||||
ContentDialog contentDialog = new()
|
||||
{
|
||||
Title = LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle],
|
||||
|
|
|
@ -132,6 +132,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
public bool EnableDiscordIntegration { get; set; }
|
||||
public bool ShowConfirmExit { get; set; }
|
||||
public bool IgnoreApplet { get; set; }
|
||||
public bool SkipUserProfiles { get; set; }
|
||||
public bool RememberWindowState { get; set; }
|
||||
public bool ShowOldUI { get; set; }
|
||||
public int HideCursor { get; set; }
|
||||
|
@ -586,6 +587,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
DramSize = config.System.DramSize;
|
||||
IgnoreMissingServices = config.System.IgnoreMissingServices;
|
||||
IgnoreApplet = config.System.IgnoreControllerApplet;
|
||||
SkipUserProfiles = config.System.SkipUserProfilesManager;
|
||||
|
||||
// CPU
|
||||
EnablePptc = config.System.EnablePtc;
|
||||
|
@ -688,6 +690,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
config.System.DramSize.Value = DramSize;
|
||||
config.System.IgnoreMissingServices.Value = IgnoreMissingServices;
|
||||
config.System.IgnoreControllerApplet.Value = IgnoreApplet;
|
||||
config.System.SkipUserProfilesManager.Value = SkipUserProfiles;
|
||||
|
||||
// CPU
|
||||
config.System.EnablePtc.Value = EnablePptc;
|
||||
|
|
|
@ -328,6 +328,11 @@
|
|||
ToolTip.Tip="{ext:Locale SettingsTabSystemEnableCustomVSyncIntervalTooltip}">
|
||||
<TextBlock Text="{ext:Locale SettingsTabSystemEnableCustomVSyncInterval}" />
|
||||
</CheckBox>
|
||||
<CheckBox
|
||||
IsChecked="{Binding SkipUserProfiles}"
|
||||
ToolTip.Tip="{ext:Locale SkipUserProfilesTooltip}">
|
||||
<TextBlock Text="{ext:Locale SettingsTabSystemSkipUserProfilesManager}" />
|
||||
</CheckBox>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
|
Loading…
Add table
Reference in a new issue