aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLordmau5 <mail@lordmau5.com>2018-06-11 01:53:28 +0200
committerLordmau5 <mail@lordmau5.com>2018-06-11 01:59:36 +0200
commitf13be6429b89d7707aaea71bc3fb6ddbcc50566e (patch)
tree735bac2d5da5f2ba69a7f119040cbbef32bdffce
parent518fe799da6dd4f12c58c9e6e174767effb0b868 (diff)
Implement GetDefaultDisplayResolution/+ChangeEvent on ICommonStateGetter
-rw-r--r--Ryujinx.Core/OsHle/Services/Am/ICommonStateGetter.cs29
1 files changed, 28 insertions, 1 deletions
diff --git a/Ryujinx.Core/OsHle/Services/Am/ICommonStateGetter.cs b/Ryujinx.Core/OsHle/Services/Am/ICommonStateGetter.cs
index ba87cf32..e0b8f6ed 100644
--- a/Ryujinx.Core/OsHle/Services/Am/ICommonStateGetter.cs
+++ b/Ryujinx.Core/OsHle/Services/Am/ICommonStateGetter.cs
@@ -13,6 +13,8 @@ namespace Ryujinx.Core.OsHle.Services.Am
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
+ private KEvent DisplayResolutionChangeEvent;
+
public ICommonStateGetter()
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
@@ -22,8 +24,12 @@ namespace Ryujinx.Core.OsHle.Services.Am
{ 5, GetOperationMode },
{ 6, GetPerformanceMode },
{ 8, GetBootMode },
- { 9, GetCurrentFocusState }
+ { 9, GetCurrentFocusState },
+ { 60, GetDefaultDisplayResolution },
+ { 61, GetDefaultDisplayResolutionChangeEvent }
};
+
+ DisplayResolutionChangeEvent = new KEvent();
}
public long GetEventHandle(ServiceCtx Context)
@@ -78,5 +84,26 @@ namespace Ryujinx.Core.OsHle.Services.Am
return 0;
}
+
+ public long GetDefaultDisplayResolution(ServiceCtx Context)
+ {
+ Context.ResponseData.Write(1280);
+ Context.ResponseData.Write(720);
+
+ // Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
+
+ 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