AmICommonStateGetter.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. namespace Ryujinx.OsHle.Objects
  2. {
  3. class AmICommonStateGetter
  4. {
  5. private enum FocusState
  6. {
  7. InFocus = 1,
  8. OutOfFocus = 2
  9. }
  10. private enum OperationMode
  11. {
  12. Handheld = 0,
  13. Docked = 1
  14. }
  15. public static long GetEventHandle(ServiceCtx Context)
  16. {
  17. Context.ResponseData.Write(0L);
  18. return 0;
  19. }
  20. public static long ReceiveMessage(ServiceCtx Context)
  21. {
  22. //Program expects 0xF at 0x17ae70 on puyo sdk,
  23. //otherwise runs on a infinite loop until it reads said value.
  24. //What it means is still unknown.
  25. Context.ResponseData.Write(0xfL);
  26. return 0; //0x680;
  27. }
  28. public static long GetOperationMode(ServiceCtx Context)
  29. {
  30. Context.ResponseData.Write((byte)OperationMode.Handheld);
  31. return 0;
  32. }
  33. public static long GetPerformanceMode(ServiceCtx Context)
  34. {
  35. Context.ResponseData.Write((byte)0);
  36. return 0;
  37. }
  38. public static long GetCurrentFocusState(ServiceCtx Context)
  39. {
  40. Context.ResponseData.Write((byte)FocusState.InFocus);
  41. return 0;
  42. }
  43. }
  44. }