SMO stubs and implementations (#129)

* WIP SMO stubs and implementations

* fixes?

* Add StorageHelper

* Whoops

* Compliant with review.

* Remove unnecessary usings
This commit is contained in:
Starlet 2018-06-02 18:46:09 -04:00 committed by gdkchan
parent f03a43fa38
commit 250e2084f4
22 changed files with 449 additions and 109 deletions

View file

@ -1,4 +1,5 @@
using Ryujinx.Core.Logging;
using Ryujinx.Core.OsHle.Handles;
using Ryujinx.Core.OsHle.Ipc;
using System.Collections.Generic;
@ -10,11 +11,14 @@ namespace Ryujinx.Core.OsHle.Services.Am
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
private KEvent LaunchableEvent;
public ISelfController()
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 1, LockExit },
{ 9, GetLibraryAppletLaunchableEvent },
{ 10, SetScreenShotPermission },
{ 11, SetOperationModeChangedNotification },
{ 12, SetPerformanceModeChangedNotification },
@ -23,6 +27,8 @@ namespace Ryujinx.Core.OsHle.Services.Am
{ 16, SetOutOfFocusSuspendingEnabled },
{ 50, SetHandlesRequestToDisplay }
};
LaunchableEvent = new KEvent();
}
public long LockExit(ServiceCtx Context)
@ -30,6 +36,19 @@ namespace Ryujinx.Core.OsHle.Services.Am
return 0;
}
public long GetLibraryAppletLaunchableEvent(ServiceCtx Context)
{
LaunchableEvent.WaitEvent.Set();
int Handle = Context.Process.HandleTable.OpenHandle(LaunchableEvent);
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
return 0;
}
public long SetScreenShotPermission(ServiceCtx Context)
{
bool Enable = Context.RequestData.ReadByte() != 0 ? true : false;