Explorar o código

Implement IStorage GetSize (#585)

gdkchan %!s(int64=7) %!d(string=hai) anos
pai
achega
b5fcf883e8
Modificáronse 1 ficheiros con 10 adicións e 1 borrados
  1. 10 1
      Ryujinx.HLE/HOS/Services/FspSrv/IStorage.cs

+ 10 - 1
Ryujinx.HLE/HOS/Services/FspSrv/IStorage.cs

@@ -16,7 +16,8 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
         {
             _commands = new Dictionary<int, ServiceProcessRequest>
             {
-                { 0, Read }
+                { 0, Read    },
+                { 4, GetSize }
             };
 
             _baseStream = baseStream;
@@ -51,5 +52,13 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
 
             return 0;
         }
+
+        // GetSize() -> u64 size
+        public long GetSize(ServiceCtx context)
+        {
+            context.ResponseData.Write(_baseStream.Length);
+
+            return 0;
+        }
     }
 }