mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Small debugging changes.
This commit is contained in:
parent
9f6729dd0b
commit
2877e9f22f
5 changed files with 12 additions and 15 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Dalamud.Utility;
|
using Dalamud.Utility;
|
||||||
using Microsoft.VisualBasic.CompilerServices;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,6 @@ public unsafe partial class ResourceLoader
|
||||||
return ReadSqPackHook.Original( resourceManager, fileDescriptor, priority, isSync );
|
return ReadSqPackHook.Original( resourceManager, fileDescriptor, priority, isSync );
|
||||||
}
|
}
|
||||||
|
|
||||||
byte ret = 0;
|
|
||||||
// Paths starting with a '|' are handled separately to allow for special treatment.
|
// Paths starting with a '|' are handled separately to allow for special treatment.
|
||||||
// They are expected to also have a closing '|'.
|
// They are expected to also have a closing '|'.
|
||||||
if( ResourceLoadCustomization == null || gamePath.Path[ 0 ] != ( byte )'|' )
|
if( ResourceLoadCustomization == null || gamePath.Path[ 0 ] != ( byte )'|' )
|
||||||
|
|
@ -160,7 +159,8 @@ public unsafe partial class ResourceLoader
|
||||||
|
|
||||||
// Split the path into the special-treatment part (between the first and second '|')
|
// Split the path into the special-treatment part (between the first and second '|')
|
||||||
// and the actual path.
|
// and the actual path.
|
||||||
var split = gamePath.Path.Split( ( byte )'|', 3, false );
|
byte ret = 0;
|
||||||
|
var split = gamePath.Path.Split( ( byte )'|', 3, false );
|
||||||
fileDescriptor->ResourceHandle->FileNameData = split[ 2 ].Path;
|
fileDescriptor->ResourceHandle->FileNameData = split[ 2 ].Path;
|
||||||
fileDescriptor->ResourceHandle->FileNameLength = split[ 2 ].Length;
|
fileDescriptor->ResourceHandle->FileNameLength = split[ 2 ].Length;
|
||||||
var funcFound = ResourceLoadCustomization.GetInvocationList()
|
var funcFound = ResourceLoadCustomization.GetInvocationList()
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using Dalamud.Hooking;
|
using Dalamud.Hooking;
|
||||||
|
using Dalamud.Logging;
|
||||||
using Dalamud.Utility.Signatures;
|
using Dalamud.Utility.Signatures;
|
||||||
using FFXIVClientStructs.FFXIV.Client.System.Resource;
|
using FFXIVClientStructs.FFXIV.Client.System.Resource;
|
||||||
using Penumbra.GameData.ByteString;
|
using Penumbra.GameData.ByteString;
|
||||||
|
|
@ -79,8 +80,14 @@ public unsafe partial class PathResolver
|
||||||
|
|
||||||
if( Penumbra.CollectionManager.ByName( split.ToString(), out var collection ) )
|
if( Penumbra.CollectionManager.ByName( split.ToString(), out var collection ) )
|
||||||
{
|
{
|
||||||
|
PluginLog.Verbose( "Using MtrlLoadHandler with collection {$Split:l} for path {$Path:l}.", split, path );
|
||||||
SetCollection( path, collection );
|
SetCollection( path, collection );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PluginLog.Verbose( "Using MtrlLoadHandler with no collection for path {$Path:l}.", path );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ret = Penumbra.ResourceLoader.DefaultLoadResource( path, resourceManager, fileDescriptor, priority, isSync );
|
ret = Penumbra.ResourceLoader.DefaultLoadResource( path, resourceManager, fileDescriptor, priority, isSync );
|
||||||
PathCollections.TryRemove( path, out _ );
|
PathCollections.TryRemove( path, out _ );
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,7 @@ public partial class MetaManager
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PluginLog.Verbose( "Using ImcLoadHandler for path {$Path:l}.", path );
|
||||||
ret = Penumbra.ResourceLoader.ReadSqPackHook.Original( resourceManager, fileDescriptor, priority, isSync );
|
ret = Penumbra.ResourceLoader.ReadSqPackHook.Original( resourceManager, fileDescriptor, priority, isSync );
|
||||||
if( Penumbra.CollectionManager.ByName( split.ToString(), out var collection )
|
if( Penumbra.CollectionManager.ByName( split.ToString(), out var collection )
|
||||||
&& collection.Cache != null
|
&& collection.Cache != null
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,9 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using Dalamud.Game.ClientState.Objects.Types;
|
|
||||||
using Dalamud.Interface;
|
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
using Lumina.Excel.GeneratedSheets;
|
|
||||||
using Penumbra.Api;
|
using Penumbra.Api;
|
||||||
using Penumbra.GameData.Enums;
|
|
||||||
using Penumbra.GameData.Structs;
|
|
||||||
using Penumbra.Interop;
|
|
||||||
using Penumbra.Interop.Structs;
|
|
||||||
using Penumbra.Meta.Files;
|
|
||||||
using Penumbra.Meta.Manipulations;
|
|
||||||
using Penumbra.UI.Custom;
|
using Penumbra.UI.Custom;
|
||||||
using CharacterUtility = Penumbra.Interop.CharacterUtility;
|
using CharacterUtility = Penumbra.Interop.CharacterUtility;
|
||||||
using ResourceHandle = Penumbra.Interop.Structs.ResourceHandle;
|
using ResourceHandle = Penumbra.Interop.Structs.ResourceHandle;
|
||||||
|
|
@ -60,8 +48,10 @@ public partial class SettingsInterface
|
||||||
PrintValue( "Mod Manager BasePath IsRooted", Path.IsPathRooted( Penumbra.Config.ModDirectory ).ToString() );
|
PrintValue( "Mod Manager BasePath IsRooted", Path.IsPathRooted( Penumbra.Config.ModDirectory ).ToString() );
|
||||||
PrintValue( "Mod Manager BasePath Exists", Directory.Exists( manager.BasePath.FullName ).ToString() );
|
PrintValue( "Mod Manager BasePath Exists", Directory.Exists( manager.BasePath.FullName ).ToString() );
|
||||||
PrintValue( "Mod Manager Valid", manager.Valid.ToString() );
|
PrintValue( "Mod Manager Valid", manager.Valid.ToString() );
|
||||||
|
PrintValue( "Path Resolver Enabled", _penumbra.PathResolver.Enabled.ToString() );
|
||||||
//PrintValue( "Resource Loader Enabled", _penumbra.ResourceLoader.IsEnabled.ToString() );
|
//PrintValue( "Resource Loader Enabled", _penumbra.ResourceLoader.IsEnabled.ToString() );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawDebugTabIpc()
|
private void DrawDebugTabIpc()
|
||||||
{
|
{
|
||||||
if( !ImGui.CollapsingHeader( "IPC##Debug" ) )
|
if( !ImGui.CollapsingHeader( "IPC##Debug" ) )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue