Update IHomeMenuFunctions.cs

This commit is contained in:
Ac_K 2018-04-21 21:17:16 +02:00 committed by GitHub
commit 68dd2f4a88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,37 +1,36 @@
using Ryujinx.Core.OsHle.Handles; using Ryujinx.Core.OsHle.Handles;
using Ryujinx.Core.OsHle.Ipc; using Ryujinx.Core.OsHle.Ipc;
using System.Collections.Generic; using System.Collections.Generic;
namespace Ryujinx.Core.OsHle.Services.Am namespace Ryujinx.Core.OsHle.Services.Am
{ {
class IHomeMenuFunctions : IpcService class IHomeMenuFunctions : IpcService
{ {
private Dictionary<int, ServiceProcessRequest> m_Commands; private Dictionary<int, ServiceProcessRequest> m_Commands;
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands; public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
private KEvent ChannelEvent; private KEvent ChannelEvent;
public IHomeMenuFunctions() public IHomeMenuFunctions()
{ {
m_Commands = new Dictionary<int, ServiceProcessRequest>() m_Commands = new Dictionary<int, ServiceProcessRequest>()
{ {
{ 10, RequestToGetForeground }, { 10, RequestToGetForeground },
{ 21, GetPopFromGeneralChannelEvent } { 21, GetPopFromGeneralChannelEvent }
}; };
ChannelEvent = new KEvent(); ChannelEvent = new KEvent();
//TODO: We shouldn't be signaling this here. //ToDo: Signal this Event somewhere in future.
ChannelEvent.WaitEvent.Set(); }
}
public long RequestToGetForeground(ServiceCtx Context) public long RequestToGetForeground(ServiceCtx Context)
{ {
Logging.Stub(LogClass.ServiceAm, "Stubbed"); Logging.Stub(LogClass.ServiceAm, "Stubbed");
return 0; return 0;
} }
public long GetPopFromGeneralChannelEvent(ServiceCtx Context) public long GetPopFromGeneralChannelEvent(ServiceCtx Context)
{ {
int Handle = Context.Process.HandleTable.OpenHandle(ChannelEvent); int Handle = Context.Process.HandleTable.OpenHandle(ChannelEvent);
@ -41,6 +40,6 @@ namespace Ryujinx.Core.OsHle.Services.Am
Logging.Stub(LogClass.ServiceAm, "Stubbed"); Logging.Stub(LogClass.ServiceAm, "Stubbed");
return 0; return 0;
} }
} }
} }