From d5cc919369c0f1551fbb251482d8a0a9a7430452 Mon Sep 17 00:00:00 2001 From: Ac_K Date: Sun, 14 Jul 2019 23:22:53 +0200 Subject: [PATCH] Fix private on some call (#733) Since the reflection code didn't take care about `private`, this cause regression, so I have added the flag just in case and fix calls who are declared with `private` to `public`. --- Ryujinx.HLE/HOS/Services/Acc/IProfile.cs | 4 ++-- Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs | 2 +- Ryujinx.HLE/HOS/Services/Aud/IAudioRendererManager.cs | 2 +- Ryujinx.HLE/HOS/Services/IpcService.cs | 2 +- Ryujinx.HLE/HOS/Services/Lr/ILocationResolverManager.cs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Ryujinx.HLE/HOS/Services/Acc/IProfile.cs b/Ryujinx.HLE/HOS/Services/Acc/IProfile.cs index 336aa40d8..050e44971 100644 --- a/Ryujinx.HLE/HOS/Services/Acc/IProfile.cs +++ b/Ryujinx.HLE/HOS/Services/Acc/IProfile.cs @@ -53,7 +53,7 @@ namespace Ryujinx.HLE.HOS.Services.Acc [Command(10)] // GetImageSize() -> u32 - private ResultCode GetImageSize(ServiceCtx context) + public ResultCode GetImageSize(ServiceCtx context) { context.ResponseData.Write(_profilePictureStream.Length); @@ -62,7 +62,7 @@ namespace Ryujinx.HLE.HOS.Services.Acc [Command(11)] // LoadImage() -> (u32, buffer) - private ResultCode LoadImage(ServiceCtx context) + public ResultCode LoadImage(ServiceCtx context) { long bufferPosition = context.Request.ReceiveBuff[0].Position; long bufferLen = context.Request.ReceiveBuff[0].Size; diff --git a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs b/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs index a07b90631..599f3d81f 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs +++ b/Ryujinx.HLE/HOS/Services/Aud/AudioRenderer/IAudioRenderer.cs @@ -93,7 +93,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud.AudioRenderer [Command(3)] // GetState() -> u32 - private ResultCode GetState(ServiceCtx context) + public ResultCode GetState(ServiceCtx context) { context.ResponseData.Write((int)_playState); diff --git a/Ryujinx.HLE/HOS/Services/Aud/IAudioRendererManager.cs b/Ryujinx.HLE/HOS/Services/Aud/IAudioRendererManager.cs index ec0c75010..29bf8320e 100644 --- a/Ryujinx.HLE/HOS/Services/Aud/IAudioRendererManager.cs +++ b/Ryujinx.HLE/HOS/Services/Aud/IAudioRendererManager.cs @@ -179,7 +179,7 @@ namespace Ryujinx.HLE.HOS.Services.Aud [Command(4)] // 4.0.0+ // GetAudioDeviceServiceWithRevisionInfo(nn::applet::AppletResourceUserId, u32) -> object - private ResultCode GetAudioDeviceServiceWithRevisionInfo(ServiceCtx context) + public ResultCode GetAudioDeviceServiceWithRevisionInfo(ServiceCtx context) { long appletResourceUserId = context.RequestData.ReadInt64(); int revisionInfo = context.RequestData.ReadInt32(); diff --git a/Ryujinx.HLE/HOS/Services/IpcService.cs b/Ryujinx.HLE/HOS/Services/IpcService.cs index 00907f889..456e1d75c 100644 --- a/Ryujinx.HLE/HOS/Services/IpcService.cs +++ b/Ryujinx.HLE/HOS/Services/IpcService.cs @@ -26,7 +26,7 @@ namespace Ryujinx.HLE.HOS.Services { Commands = Assembly.GetExecutingAssembly().GetTypes() .Where(type => type == GetType()) - .SelectMany(type => type.GetMethods(BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public)) + .SelectMany(type => type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public)) .SelectMany(methodInfo => methodInfo.GetCustomAttributes(typeof(CommandAttribute)) .Select(command => (((CommandAttribute)command).Id, methodInfo))) .ToDictionary(command => command.Id, command => command.methodInfo); diff --git a/Ryujinx.HLE/HOS/Services/Lr/ILocationResolverManager.cs b/Ryujinx.HLE/HOS/Services/Lr/ILocationResolverManager.cs index 188a1720a..14ed0ca78 100644 --- a/Ryujinx.HLE/HOS/Services/Lr/ILocationResolverManager.cs +++ b/Ryujinx.HLE/HOS/Services/Lr/ILocationResolverManager.cs @@ -9,7 +9,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr [Command(0)] // OpenLocationResolver() - private ResultCode OpenLocationResolver(ServiceCtx context) + public ResultCode OpenLocationResolver(ServiceCtx context) { StorageId storageId = (StorageId)context.RequestData.ReadByte();