|
11 | 11 | using Penumbra.Interop.Hooks.Resources;
|
12 | 12 | using Penumbra.Interop.Structs;
|
13 | 13 | using Penumbra.Services;
|
| 14 | +using Penumbra.String.Classes; |
14 | 15 | using CharacterUtility = Penumbra.Interop.Services.CharacterUtility;
|
15 | 16 | using CSModelRenderer = FFXIVClientStructs.FFXIV.Client.Graphics.Render.ModelRenderer;
|
16 | 17 | using ModelRenderer = Penumbra.Interop.Services.ModelRenderer;
|
@@ -109,8 +110,8 @@ public ShaderReplacementFixer(ResourceHandleDestructor resourceHandleDestructor,
|
109 | 110 | CommunicatorService communicator, HookManager hooks, CharacterBaseVTables vTables, HumanSetupScalingHook humanSetupScalingHook)
|
110 | 111 | {
|
111 | 112 | _resourceHandleDestructor = resourceHandleDestructor;
|
112 |
| - _communicator = communicator; |
113 |
| - _humanSetupScalingHook = humanSetupScalingHook; |
| 113 | + _communicator = communicator; |
| 114 | + _humanSetupScalingHook = humanSetupScalingHook; |
114 | 115 |
|
115 | 116 | _skinState = new ModdedShaderPackageState(
|
116 | 117 | () => (ShaderPackageResourceHandle**)&utility.Address->SkinShpkResource,
|
@@ -467,7 +468,7 @@ private static int GetDataSetExpectedSize(uint dataFlags)
|
467 | 468 |
|
468 | 469 | private Texture* PrepareColorTableDetour(MaterialResourceHandle* thisPtr, byte stain0Id, byte stain1Id)
|
469 | 470 | {
|
470 |
| - if (thisPtr->DataSetSize < GetDataSetExpectedSize(thisPtr->DataFlags)) |
| 471 | + if (thisPtr->DataSetSize < GetDataSetExpectedSize(thisPtr->DataFlags) && Utf8GamePath.IsRooted(thisPtr->FileName.AsSpan())) |
471 | 472 | Penumbra.Log.Warning(
|
472 | 473 | $"Material at {thisPtr->FileName} has data set of size {thisPtr->DataSetSize} bytes, but should have at least {GetDataSetExpectedSize(thisPtr->DataFlags)} bytes. This may cause crashes due to access violations.");
|
473 | 474 |
|
@@ -507,9 +508,8 @@ private sealed class ModdedShaderPackageState(ShaderPackageReferenceGetter refer
|
507 | 508 | private readonly ConcurrentSet<nint> _materials = new();
|
508 | 509 |
|
509 | 510 | // ConcurrentDictionary.Count uses a lock in its current implementation.
|
510 |
| - private uint _materialCount = 0; |
511 |
| - |
512 |
| - private ulong _slowPathCallDelta = 0; |
| 511 | + private uint _materialCount; |
| 512 | + private ulong _slowPathCallDelta; |
513 | 513 |
|
514 | 514 | public uint MaterialCount
|
515 | 515 | {
|
|
0 commit comments