IImageDatabaseService.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Ryujinx.Common.Logging;
  2. namespace Ryujinx.HLE.HOS.Services.Mii
  3. {
  4. [Service("miiimg")] // 5.0.0+
  5. class IImageDatabaseService : IpcService
  6. {
  7. private uint _imageCount;
  8. private bool _isDirty;
  9. public IImageDatabaseService(ServiceCtx context) { }
  10. [CommandHipc(0)]
  11. // Initialize(b8) -> b8
  12. public ResultCode Initialize(ServiceCtx context)
  13. {
  14. // TODO: Service uses MiiImage:/database.dat if true, seems to use hardcoded data if false.
  15. bool useHardcodedData = context.RequestData.ReadBoolean();
  16. _imageCount = 0;
  17. _isDirty = false;
  18. context.ResponseData.Write(_isDirty);
  19. Logger.Stub?.PrintStub(LogClass.ServiceMii, new { useHardcodedData });
  20. return ResultCode.Success;
  21. }
  22. [CommandHipc(11)]
  23. // GetCount() -> u32
  24. public ResultCode GetCount(ServiceCtx context)
  25. {
  26. context.ResponseData.Write(_imageCount);
  27. Logger.Stub?.PrintStub(LogClass.ServiceMii);
  28. return ResultCode.Success;
  29. }
  30. }
  31. }