forked from Mirror/Ryujinx
mm: Cleaned up the service a bit (#2233)
This commit is contained in:
parent
c1cbdd45dc
commit
3e61fb0268
2 changed files with 14 additions and 15 deletions
|
@ -12,7 +12,7 @@ namespace Ryujinx.HLE.HOS.Services.Mm
|
||||||
|
|
||||||
private static uint _uniqueId = 1;
|
private static uint _uniqueId = 1;
|
||||||
|
|
||||||
public IRequest(ServiceCtx context) {}
|
public IRequest(ServiceCtx context) { }
|
||||||
|
|
||||||
[CommandHipc(0)]
|
[CommandHipc(0)]
|
||||||
// InitializeOld(u32, u32, u32)
|
// InitializeOld(u32, u32, u32)
|
||||||
|
@ -50,14 +50,14 @@ namespace Ryujinx.HLE.HOS.Services.Mm
|
||||||
public ResultCode SetAndWaitOld(ServiceCtx context)
|
public ResultCode SetAndWaitOld(ServiceCtx context)
|
||||||
{
|
{
|
||||||
MultiMediaOperationType operationType = (MultiMediaOperationType)context.RequestData.ReadUInt32();
|
MultiMediaOperationType operationType = (MultiMediaOperationType)context.RequestData.ReadUInt32();
|
||||||
uint value = context.RequestData.ReadUInt32();
|
uint frequenceHz = context.RequestData.ReadUInt32();
|
||||||
int timeout = context.RequestData.ReadInt32();
|
int timeout = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.Stub?.PrintStub(LogClass.ServiceMm, new { operationType, value, timeout });
|
Logger.Stub?.PrintStub(LogClass.ServiceMm, new { operationType, frequenceHz, timeout });
|
||||||
|
|
||||||
lock (_sessionListLock)
|
lock (_sessionListLock)
|
||||||
{
|
{
|
||||||
GetSessionByType(operationType)?.SetAndWait(value, timeout);
|
GetSessionByType(operationType)?.SetAndWait(frequenceHz, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
|
@ -121,14 +121,14 @@ namespace Ryujinx.HLE.HOS.Services.Mm
|
||||||
public ResultCode SetAndWait(ServiceCtx context)
|
public ResultCode SetAndWait(ServiceCtx context)
|
||||||
{
|
{
|
||||||
uint id = context.RequestData.ReadUInt32();
|
uint id = context.RequestData.ReadUInt32();
|
||||||
uint value = context.RequestData.ReadUInt32();
|
uint frequenceHz = context.RequestData.ReadUInt32();
|
||||||
int timeout = context.RequestData.ReadInt32();
|
int timeout = context.RequestData.ReadInt32();
|
||||||
|
|
||||||
Logger.Stub?.PrintStub(LogClass.ServiceMm, new { id, value, timeout });
|
Logger.Stub?.PrintStub(LogClass.ServiceMm, new { id, frequenceHz, timeout });
|
||||||
|
|
||||||
lock (_sessionListLock)
|
lock (_sessionListLock)
|
||||||
{
|
{
|
||||||
GetSessionById(id)?.SetAndWait(value, timeout);
|
GetSessionById(id)?.SetAndWait(frequenceHz, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
|
|
|
@ -2,10 +2,9 @@
|
||||||
{
|
{
|
||||||
enum MultiMediaOperationType : uint
|
enum MultiMediaOperationType : uint
|
||||||
{
|
{
|
||||||
// TODO: figure out the unknown variants.
|
Ram = 2,
|
||||||
Unknown2 = 2,
|
NvEnc = 5,
|
||||||
VideoDecode = 5,
|
NvDec = 6,
|
||||||
VideoEncode = 6,
|
NvJpg = 7
|
||||||
Unknown7 = 7
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue