1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-10 11:41:42 +00:00

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:
mageven 2020-07-04 04:18:07 +05:30 committed by GitHub
parent dbeb50684d
commit 5644780e6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 0 deletions

View file

@ -7,6 +7,8 @@ namespace Ryujinx.HLE.HOS.Services.Nifm
Success = 0,
Unknown112 = (112 << ErrorCodeShift) | ModuleId, // IRequest::GetResult
Unknown180 = (180 << ErrorCodeShift) | ModuleId, // IRequest::GetAppletInfo
NoInternetConnection = (300 << ErrorCodeShift) | ModuleId,
ObjectIsNull = (350 << ErrorCodeShift) | ModuleId
}

View file

@ -38,6 +38,11 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
{
Logger.PrintStub(LogClass.ServiceNifm);
return GetResultImpl();
}
private ResultCode GetResultImpl()
{
return ResultCode.Success;
}
@ -86,5 +91,32 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
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;
}
}
}