aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Barney <thealexbarney@gmail.com>2020-04-12 05:13:23 -0700
committerGitHub <noreply@github.com>2020-04-12 22:13:23 +1000
commit6052aa17f262418c361f1fda65bc9fbf6e7d773c (patch)
tree4f447acfb9646d3a5bbeeb3c7214670ff032a75c
parent496db602ffce6234de58babac67fb6bcd45d32df (diff)
Print the result name in SetTerminateResult if possible (#1105)
-rw-r--r--Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs13
1 files changed, 2 insertions, 11 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs b/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs
index b5ecb2f5..5d92b433 100644
--- a/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs
+++ b/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs
@@ -84,22 +84,13 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
// SetTerminateResult(u32)
public ResultCode SetTerminateResult(ServiceCtx context)
{
- int errorCode = context.RequestData.ReadInt32();
- string result = GetFormattedErrorCode(errorCode);
+ Result result = new Result(context.RequestData.ReadUInt32());
- Logger.PrintInfo(LogClass.ServiceAm, $"Result = 0x{errorCode:x8} ({result}).");
+ Logger.PrintInfo(LogClass.ServiceAm, $"Result = 0x{result.Value:x8} ({result.ToStringWithName()}).");
return ResultCode.Success;
}
- private string GetFormattedErrorCode(int errorCode)
- {
- int module = (errorCode >> 0) & 0x1ff;
- int description = (errorCode >> 9) & 0x1fff;
-
- return $"{(2000 + module):d4}-{description:d4}";
- }
-
[Command(23)]
// GetDisplayVersion() -> nn::oe::DisplayVersion
public ResultCode GetDisplayVersion(ServiceCtx context)