mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-14 04:34:19 +01:00
Only put out warnings if the path is rooted.
This commit is contained in:
parent
7b2e82b27f
commit
2753c786fc
2 changed files with 7 additions and 7 deletions
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0647fbc5017ef9ced3f3ce1c2496eefd57c5b7a8
|
Subproject commit b9003b97da2d1191fa203a4d66956bc54c21db2a
|
||||||
|
|
@ -11,6 +11,7 @@ using Penumbra.GameData.Files.MaterialStructs;
|
||||||
using Penumbra.Interop.Hooks.Resources;
|
using Penumbra.Interop.Hooks.Resources;
|
||||||
using Penumbra.Interop.Structs;
|
using Penumbra.Interop.Structs;
|
||||||
using Penumbra.Services;
|
using Penumbra.Services;
|
||||||
|
using Penumbra.String.Classes;
|
||||||
using CharacterUtility = Penumbra.Interop.Services.CharacterUtility;
|
using CharacterUtility = Penumbra.Interop.Services.CharacterUtility;
|
||||||
using CSModelRenderer = FFXIVClientStructs.FFXIV.Client.Graphics.Render.ModelRenderer;
|
using CSModelRenderer = FFXIVClientStructs.FFXIV.Client.Graphics.Render.ModelRenderer;
|
||||||
using ModelRenderer = Penumbra.Interop.Services.ModelRenderer;
|
using ModelRenderer = Penumbra.Interop.Services.ModelRenderer;
|
||||||
|
|
@ -109,8 +110,8 @@ public sealed unsafe class ShaderReplacementFixer : IDisposable, IRequiredServic
|
||||||
CommunicatorService communicator, HookManager hooks, CharacterBaseVTables vTables, HumanSetupScalingHook humanSetupScalingHook)
|
CommunicatorService communicator, HookManager hooks, CharacterBaseVTables vTables, HumanSetupScalingHook humanSetupScalingHook)
|
||||||
{
|
{
|
||||||
_resourceHandleDestructor = resourceHandleDestructor;
|
_resourceHandleDestructor = resourceHandleDestructor;
|
||||||
_communicator = communicator;
|
_communicator = communicator;
|
||||||
_humanSetupScalingHook = humanSetupScalingHook;
|
_humanSetupScalingHook = humanSetupScalingHook;
|
||||||
|
|
||||||
_skinState = new ModdedShaderPackageState(
|
_skinState = new ModdedShaderPackageState(
|
||||||
() => (ShaderPackageResourceHandle**)&utility.Address->SkinShpkResource,
|
() => (ShaderPackageResourceHandle**)&utility.Address->SkinShpkResource,
|
||||||
|
|
@ -467,7 +468,7 @@ public sealed unsafe class ShaderReplacementFixer : IDisposable, IRequiredServic
|
||||||
|
|
||||||
private Texture* PrepareColorTableDetour(MaterialResourceHandle* thisPtr, byte stain0Id, byte stain1Id)
|
private Texture* PrepareColorTableDetour(MaterialResourceHandle* thisPtr, byte stain0Id, byte stain1Id)
|
||||||
{
|
{
|
||||||
if (thisPtr->DataSetSize < GetDataSetExpectedSize(thisPtr->DataFlags))
|
if (thisPtr->DataSetSize < GetDataSetExpectedSize(thisPtr->DataFlags) && Utf8GamePath.IsRooted(thisPtr->FileName.AsSpan()))
|
||||||
Penumbra.Log.Warning(
|
Penumbra.Log.Warning(
|
||||||
$"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.");
|
$"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.");
|
||||||
|
|
||||||
|
|
@ -507,9 +508,8 @@ public sealed unsafe class ShaderReplacementFixer : IDisposable, IRequiredServic
|
||||||
private readonly ConcurrentSet<nint> _materials = new();
|
private readonly ConcurrentSet<nint> _materials = new();
|
||||||
|
|
||||||
// ConcurrentDictionary.Count uses a lock in its current implementation.
|
// ConcurrentDictionary.Count uses a lock in its current implementation.
|
||||||
private uint _materialCount = 0;
|
private uint _materialCount;
|
||||||
|
private ulong _slowPathCallDelta;
|
||||||
private ulong _slowPathCallDelta = 0;
|
|
||||||
|
|
||||||
public uint MaterialCount
|
public uint MaterialCount
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue