diff options
| author | Ac_K <Acoustik666@gmail.com> | 2018-06-12 23:30:45 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-12 23:30:45 +0000 |
| commit | 3600de608046301000a6ad7cf287024bb872c363 (patch) | |
| tree | b3d7c8d378cf646426eaa195253e54ef8d8e819f | |
| parent | 98e6a34608cc31f1f40e964a4a8cc80606877eca (diff) | |
| parent | 5b9ce52108b24b52b489e43cb0cc508c05abfa7a (diff) | |
Merge pull request #148 from Lordmau5/ICommonStateGetter
Implement GetDefaultDisplayResolution/+ChangeEvent on ICommonStateGetter
| -rw-r--r-- | Ryujinx.HLE/OsHle/Services/Am/ICommonStateGetter.cs | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/Ryujinx.HLE/OsHle/Services/Am/ICommonStateGetter.cs b/Ryujinx.HLE/OsHle/Services/Am/ICommonStateGetter.cs index 2b575cb7..e1a13c59 100644 --- a/Ryujinx.HLE/OsHle/Services/Am/ICommonStateGetter.cs +++ b/Ryujinx.HLE/OsHle/Services/Am/ICommonStateGetter.cs @@ -13,17 +13,23 @@ namespace Ryujinx.HLE.OsHle.Services.Am public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands; + private KEvent DisplayResolutionChangeEvent; + public ICommonStateGetter() { m_Commands = new Dictionary<int, ServiceProcessRequest>() { - { 0, GetEventHandle }, - { 1, ReceiveMessage }, - { 5, GetOperationMode }, - { 6, GetPerformanceMode }, - { 8, GetBootMode }, - { 9, GetCurrentFocusState } + { 0, GetEventHandle }, + { 1, ReceiveMessage }, + { 5, GetOperationMode }, + { 6, GetPerformanceMode }, + { 8, GetBootMode }, + { 9, GetCurrentFocusState }, + { 60, GetDefaultDisplayResolution }, + { 61, GetDefaultDisplayResolutionChangeEvent } }; + + DisplayResolutionChangeEvent = new KEvent(); } public long GetEventHandle(ServiceCtx Context) @@ -78,5 +84,24 @@ namespace Ryujinx.HLE.OsHle.Services.Am 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; + } } }
\ No newline at end of file |
