forked from Mirror/Ryujinx
Stub nifm IRequest GetAppletInfo (#1326)
* Stub GetAppletInfo to be consistent with GetResult * Fix formatting and enum * Update and use ResultCode
This commit is contained in:
parent
dbeb50684d
commit
5644780e6e
2 changed files with 34 additions and 0 deletions
|
@ -7,6 +7,8 @@ namespace Ryujinx.HLE.HOS.Services.Nifm
|
||||||
|
|
||||||
Success = 0,
|
Success = 0,
|
||||||
|
|
||||||
|
Unknown112 = (112 << ErrorCodeShift) | ModuleId, // IRequest::GetResult
|
||||||
|
Unknown180 = (180 << ErrorCodeShift) | ModuleId, // IRequest::GetAppletInfo
|
||||||
NoInternetConnection = (300 << ErrorCodeShift) | ModuleId,
|
NoInternetConnection = (300 << ErrorCodeShift) | ModuleId,
|
||||||
ObjectIsNull = (350 << ErrorCodeShift) | ModuleId
|
ObjectIsNull = (350 << ErrorCodeShift) | ModuleId
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,11 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
|
||||||
{
|
{
|
||||||
Logger.PrintStub(LogClass.ServiceNifm);
|
Logger.PrintStub(LogClass.ServiceNifm);
|
||||||
|
|
||||||
|
return GetResultImpl();
|
||||||
|
}
|
||||||
|
|
||||||
|
private ResultCode GetResultImpl()
|
||||||
|
{
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,5 +91,32 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
|
||||||
|
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Command(21)]
|
||||||
|
// GetAppletInfo(u32) -> (u32, u32, u32, buffer<bytes, 6>)
|
||||||
|
public ResultCode GetAppletInfo(ServiceCtx context)
|
||||||
|
{
|
||||||
|
uint themeColor = context.RequestData.ReadUInt32();
|
||||||
|
|
||||||
|
Logger.PrintStub(LogClass.ServiceNifm);
|
||||||
|
|
||||||
|
ResultCode result = GetResultImpl();
|
||||||
|
|
||||||
|
if (result == ResultCode.Success || (ResultCode)((int)result & 0x3fffff) == ResultCode.Unknown112)
|
||||||
|
{
|
||||||
|
return ResultCode.Unknown180;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns appletId, libraryAppletMode, outSize and a buffer.
|
||||||
|
// Returned applet ids- (0x19, 0xf, 0xe)
|
||||||
|
// libraryAppletMode seems to be 0 for all applets supported.
|
||||||
|
|
||||||
|
// TODO: check order
|
||||||
|
context.ResponseData.Write(0xe); // Use error applet as default for now
|
||||||
|
context.ResponseData.Write(0); // libraryAppletMode
|
||||||
|
context.ResponseData.Write(0); // outSize
|
||||||
|
|
||||||
|
return ResultCode.Success;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue