mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Use read-only MMIO for legacy ShPk ban
This commit is contained in:
parent
fb58a9c271
commit
03e9dc55df
1 changed files with 2 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
|||
using System.IO.MemoryMappedFiles;
|
||||
using FFXIVClientStructs.FFXIV.Client.System.Resource;
|
||||
using Penumbra.Api.Enums;
|
||||
using Penumbra.Collections;
|
||||
|
|
@ -52,7 +53,7 @@ public sealed class ShpkPathPreProcessor(ResourceManagerService resourceManager,
|
|||
{
|
||||
try
|
||||
{
|
||||
using var file = MmioMemoryManager.CreateFromFile(path);
|
||||
using var file = MmioMemoryManager.CreateFromFile(path, access: MemoryMappedFileAccess.Read);
|
||||
var bytes = file.GetSpan();
|
||||
|
||||
return ShpkFile.FastIsLegacy(bytes)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue