IHomeMenuFunctions.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using Ryujinx.Core.OsHle.Handles;
  2. using Ryujinx.Core.OsHle.Ipc;
  3. using System.Collections.Generic;
  4. namespace Ryujinx.Core.OsHle.Services.Am
  5. {
  6. class IHomeMenuFunctions : IpcService
  7. {
  8. private Dictionary<int, ServiceProcessRequest> m_Commands;
  9. public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
  10. private KEvent ChannelEvent;
  11. public IHomeMenuFunctions()
  12. {
  13. m_Commands = new Dictionary<int, ServiceProcessRequest>()
  14. {
  15. { 10, RequestToGetForeground },
  16. { 21, GetPopFromGeneralChannelEvent }
  17. };
  18. //ToDo: Signal this Event somewhere in future.
  19. ChannelEvent = new KEvent();
  20. }
  21. public long RequestToGetForeground(ServiceCtx Context)
  22. {
  23. Logging.Stub(LogClass.ServiceAm, "Stubbed");
  24. return 0;
  25. }
  26. public long GetPopFromGeneralChannelEvent(ServiceCtx Context)
  27. {
  28. int Handle = Context.Process.HandleTable.OpenHandle(ChannelEvent);
  29. Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
  30. Logging.Stub(LogClass.ServiceAm, "Stubbed");
  31. return 0;
  32. }
  33. }
  34. }