2018-06-10 21:46:42 -03:00
|
|
|
using Ryujinx.HLE.Logging;
|
|
|
|
using Ryujinx.HLE.OsHle.Ipc;
|
2018-02-09 21:14:55 -03:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
2018-06-10 21:46:42 -03:00
|
|
|
namespace Ryujinx.HLE.OsHle.Services.Am
|
2018-02-09 21:14:55 -03:00
|
|
|
{
|
2018-03-19 15:58:46 -03:00
|
|
|
class IWindowController : IpcService
|
2018-02-09 21:14:55 -03:00
|
|
|
{
|
|
|
|
private Dictionary<int, ServiceProcessRequest> m_Commands;
|
|
|
|
|
2018-03-19 15:58:46 -03:00
|
|
|
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
2018-02-09 21:14:55 -03:00
|
|
|
|
|
|
|
public IWindowController()
|
|
|
|
{
|
|
|
|
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
|
|
|
{
|
2018-04-24 15:57:39 -03:00
|
|
|
{ 1, GetAppletResourceUserId },
|
2018-02-09 21:14:55 -03:00
|
|
|
{ 10, AcquireForegroundRights }
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
public long GetAppletResourceUserId(ServiceCtx Context)
|
|
|
|
{
|
2018-04-24 15:57:39 -03:00
|
|
|
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
2018-04-17 03:24:42 +03:00
|
|
|
|
2018-02-09 21:14:55 -03:00
|
|
|
Context.ResponseData.Write(0L);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
public long AcquireForegroundRights(ServiceCtx Context)
|
|
|
|
{
|
2018-04-24 15:57:39 -03:00
|
|
|
Context.Ns.Log.PrintStub(LogClass.ServiceAm, "Stubbed.");
|
2018-04-17 03:24:42 +03:00
|
|
|
|
2018-02-09 21:14:55 -03:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|