ServiceSet.cs 910 B

1234567891011121314151617181920212223242526272829303132
  1. using ChocolArm64.Memory;
  2. namespace Ryujinx.Core.OsHle.Services
  3. {
  4. static partial class Service
  5. {
  6. private const int LangCodesCount = 13;
  7. public static long SetGetAvailableLanguageCodes(ServiceCtx Context)
  8. {
  9. int PtrBuffSize = Context.RequestData.ReadInt32();
  10. if (Context.Request.RecvListBuff.Count > 0)
  11. {
  12. long Position = Context.Request.RecvListBuff[0].Position;
  13. short Size = Context.Request.RecvListBuff[0].Size;
  14. //This should return an array of ints with values matching the LanguageCode enum.
  15. byte[] Data = new byte[Size];
  16. Data[0] = 0;
  17. Data[1] = 1;
  18. AMemoryHelper.WriteBytes(Context.Memory, Position, Data);
  19. }
  20. Context.ResponseData.Write(LangCodesCount);
  21. return 0;
  22. }
  23. }
  24. }