mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-04 10:02:00 +00:00
Print the result name in SetTerminateResult if possible (#1105)
This commit is contained in:
parent
496db602ff
commit
6052aa17f2
1 changed files with 2 additions and 11 deletions
|
@ -84,22 +84,13 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.Applicati
|
||||||
// SetTerminateResult(u32)
|
// SetTerminateResult(u32)
|
||||||
public ResultCode SetTerminateResult(ServiceCtx context)
|
public ResultCode SetTerminateResult(ServiceCtx context)
|
||||||
{
|
{
|
||||||
int errorCode = context.RequestData.ReadInt32();
|
Result result = new Result(context.RequestData.ReadUInt32());
|
||||||
string result = GetFormattedErrorCode(errorCode);
|
|
||||||
|
|
||||||
Logger.PrintInfo(LogClass.ServiceAm, $"Result = 0x{errorCode:x8} ({result}).");
|
Logger.PrintInfo(LogClass.ServiceAm, $"Result = 0x{result.Value:x8} ({result.ToStringWithName()}).");
|
||||||
|
|
||||||
return ResultCode.Success;
|
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)]
|
[Command(23)]
|
||||||
// GetDisplayVersion() -> nn::oe::DisplayVersion
|
// GetDisplayVersion() -> nn::oe::DisplayVersion
|
||||||
public ResultCode GetDisplayVersion(ServiceCtx context)
|
public ResultCode GetDisplayVersion(ServiceCtx context)
|
||||||
|
|
Loading…
Reference in a new issue