IpcBuffDesc.cs 701 B

123456789101112131415161718192021222324252627
  1. using System.IO;
  2. namespace Ryujinx.HLE.HOS.Ipc
  3. {
  4. struct IpcBuffDesc
  5. {
  6. public long Position { get; private set; }
  7. public long Size { get; private set; }
  8. public int Flags { get; private set; }
  9. public IpcBuffDesc(BinaryReader reader)
  10. {
  11. long word0 = reader.ReadUInt32();
  12. long word1 = reader.ReadUInt32();
  13. long word2 = reader.ReadUInt32();
  14. Position = word1;
  15. Position |= (word2 << 4) & 0x0f00000000;
  16. Position |= (word2 << 34) & 0x7000000000;
  17. Size = word0;
  18. Size |= (word2 << 8) & 0xf00000000;
  19. Flags = (int)word2 & 3;
  20. }
  21. }
  22. }