mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-05-15 22:47:42 +02:00
Compare commits
No commits in common. "e7d3f39c1b21ca54b67ac620253ba245f399cebf" and "86c2f261afd1bc098e89c0285cd2c5bbdf24b41f" have entirely different histories.
e7d3f39c1b
...
86c2f261af
2 changed files with 11 additions and 34 deletions
|
@ -1,10 +1,8 @@
|
||||||
using Gommon;
|
|
||||||
using Ryujinx.Common.Logging;
|
using Ryujinx.Common.Logging;
|
||||||
using Ryujinx.HLE.Exceptions;
|
using Ryujinx.HLE.Exceptions;
|
||||||
using Ryujinx.HLE.HOS.Ipc;
|
using Ryujinx.HLE.HOS.Ipc;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
@ -23,42 +21,21 @@ namespace Ryujinx.HLE.HOS.Services
|
||||||
private int _selfId;
|
private int _selfId;
|
||||||
private bool _isDomain;
|
private bool _isDomain;
|
||||||
|
|
||||||
public IpcService(ServerBase server = null, bool registerTipc = false)
|
public IpcService(ServerBase server = null)
|
||||||
{
|
{
|
||||||
Stopwatch sw = Stopwatch.StartNew();
|
CmifCommands = GetType().Assembly.GetTypes()
|
||||||
|
.Where(type => type == GetType())
|
||||||
CmifCommands = GetType()
|
.SelectMany(type => type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public))
|
||||||
.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public)
|
|
||||||
.SelectMany(methodInfo => methodInfo.GetCustomAttributes<CommandCmifAttribute>()
|
.SelectMany(methodInfo => methodInfo.GetCustomAttributes<CommandCmifAttribute>()
|
||||||
.Select(command => (command.Id, methodInfo)))
|
.Select(command => (command.Id, methodInfo)))
|
||||||
.ToDictionary(command => command.Id, command => command.methodInfo);
|
.ToDictionary(command => command.Id, command => command.methodInfo);
|
||||||
|
|
||||||
sw.Stop();
|
TipcCommands = GetType().Assembly.GetTypes()
|
||||||
|
.Where(type => type == GetType())
|
||||||
Logger.Debug?.Print(
|
.SelectMany(type => type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public))
|
||||||
LogClass.Emulation,
|
.SelectMany(methodInfo => methodInfo.GetCustomAttributes<CommandTipcAttribute>()
|
||||||
$"{CmifCommands.Count} Cmif commands loaded in {sw.ElapsedTicks} ticks ({Stopwatch.Frequency} tps).",
|
.Select(command => (command.Id, methodInfo)))
|
||||||
GetType().AsPrettyString()
|
.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;
|
Server = server;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace Ryujinx.HLE.HOS.Services.Sm
|
||||||
|
|
||||||
private bool _isInitialized;
|
private bool _isInitialized;
|
||||||
|
|
||||||
public IUserInterface(KernelContext context, SmRegistry registry) : base(registerTipc: true)
|
public IUserInterface(KernelContext context, SmRegistry registry)
|
||||||
{
|
{
|
||||||
_commonServer = new ServerBase(context, "CommonServer");
|
_commonServer = new ServerBase(context, "CommonServer");
|
||||||
_registry = registry;
|
_registry = registry;
|
||||||
|
|
Loading…
Add table
Reference in a new issue