mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2025-12-22 08:15:09 -06:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user