mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-23 16:25:30 +00:00
Merge pull request #148 from Lordmau5/ICommonStateGetter
Implement GetDefaultDisplayResolution/+ChangeEvent on ICommonStateGetter
This commit is contained in:
commit
3600de6080
|
@ -13,17 +13,23 @@ namespace Ryujinx.HLE.OsHle.Services.Am
|
||||||
|
|
||||||
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
||||||
|
|
||||||
|
private KEvent DisplayResolutionChangeEvent;
|
||||||
|
|
||||||
public ICommonStateGetter()
|
public ICommonStateGetter()
|
||||||
{
|
{
|
||||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||||
{
|
{
|
||||||
{ 0, GetEventHandle },
|
{ 0, GetEventHandle },
|
||||||
{ 1, ReceiveMessage },
|
{ 1, ReceiveMessage },
|
||||||
{ 5, GetOperationMode },
|
{ 5, GetOperationMode },
|
||||||
{ 6, GetPerformanceMode },
|
{ 6, GetPerformanceMode },
|
||||||
{ 8, GetBootMode },
|
{ 8, GetBootMode },
|
||||||
{ 9, GetCurrentFocusState }
|
{ 9, GetCurrentFocusState },
|
||||||
|
{ 60, GetDefaultDisplayResolution },
|
||||||
|
{ 61, GetDefaultDisplayResolutionChangeEvent }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DisplayResolutionChangeEvent = new KEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long GetEventHandle(ServiceCtx Context)
|
public long GetEventHandle(ServiceCtx Context)
|
||||||
|
@ -78,5 +84,24 @@ namespace Ryujinx.HLE.OsHle.Services.Am
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long GetDefaultDisplayResolution(ServiceCtx Context)
|
||||||
|
{
|
||||||
|
Context.ResponseData.Write(1280);
|
||||||
|
Context.ResponseData.Write(720);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long GetDefaultDisplayResolutionChangeEvent(ServiceCtx Context)
|
||||||
|
{
|
||||||
|
int Handle = Context.Process.HandleTable.OpenHandle(DisplayResolutionChangeEvent);
|
||||||
|
|
||||||
|
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
|
||||||
|
|
||||||
|
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue