mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-24 08:20:11 +01:00
Update IStorage.cs (#415)
Lock the stream fix a multithreading error when a XCI game try to access to the RomFs.
This commit is contained in:
parent
e5917f8968
commit
476ebf5b03
@ -39,8 +39,11 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||
|
||||
byte[] Data = new byte[Size];
|
||||
|
||||
BaseStream.Seek(Offset, SeekOrigin.Begin);
|
||||
BaseStream.Read(Data, 0, Data.Length);
|
||||
lock (BaseStream)
|
||||
{
|
||||
BaseStream.Seek(Offset, SeekOrigin.Begin);
|
||||
BaseStream.Read(Data, 0, Data.Length);
|
||||
}
|
||||
|
||||
Context.Memory.WriteBytes(BuffDesc.Position, Data);
|
||||
}
|
||||
@ -48,4 +51,4 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user