mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-14 04:34:19 +01:00
Fix IMC handling.
This commit is contained in:
parent
d07355c0f8
commit
d03a3168b0
8 changed files with 77 additions and 41 deletions
|
|
@ -19,13 +19,13 @@ public unsafe partial class ResourceLoader
|
|||
// Gather some debugging data about penumbra-loaded objects.
|
||||
public struct DebugData
|
||||
{
|
||||
public ResourceHandle* OriginalResource;
|
||||
public ResourceHandle* ManipulatedResource;
|
||||
public Utf8GamePath OriginalPath;
|
||||
public FullPath ManipulatedPath;
|
||||
public ResourceCategory Category;
|
||||
public object? ResolverInfo;
|
||||
public uint Extension;
|
||||
public Structs.ResourceHandle* OriginalResource;
|
||||
public Structs.ResourceHandle* ManipulatedResource;
|
||||
public Utf8GamePath OriginalPath;
|
||||
public FullPath ManipulatedPath;
|
||||
public ResourceCategory Category;
|
||||
public object? ResolverInfo;
|
||||
public uint Extension;
|
||||
}
|
||||
|
||||
private readonly SortedDictionary< FullPath, DebugData > _debugList = new();
|
||||
|
|
@ -44,7 +44,8 @@ public unsafe partial class ResourceLoader
|
|||
ResourceLoaded -= AddModifiedDebugInfo;
|
||||
}
|
||||
|
||||
private void AddModifiedDebugInfo( ResourceHandle* handle, Utf8GamePath originalPath, FullPath? manipulatedPath, object? resolverInfo )
|
||||
private void AddModifiedDebugInfo( Structs.ResourceHandle* handle, Utf8GamePath originalPath, FullPath? manipulatedPath,
|
||||
object? resolverInfo )
|
||||
{
|
||||
if( manipulatedPath == null )
|
||||
{
|
||||
|
|
@ -55,7 +56,7 @@ public unsafe partial class ResourceLoader
|
|||
var originalResource = FindResource( handle->Category, handle->FileType, crc );
|
||||
_debugList[ manipulatedPath.Value ] = new DebugData()
|
||||
{
|
||||
OriginalResource = originalResource,
|
||||
OriginalResource = ( Structs.ResourceHandle* )originalResource,
|
||||
ManipulatedResource = handle,
|
||||
Category = handle->Category,
|
||||
Extension = handle->FileType,
|
||||
|
|
@ -172,8 +173,8 @@ public unsafe partial class ResourceLoader
|
|||
{
|
||||
_deleteList.Add( ( data.ManipulatedPath, data with
|
||||
{
|
||||
OriginalResource = regularResource,
|
||||
ManipulatedResource = modifiedResource,
|
||||
OriginalResource = ( Structs.ResourceHandle* )regularResource,
|
||||
ManipulatedResource = ( Structs.ResourceHandle* )modifiedResource,
|
||||
} ) );
|
||||
}
|
||||
}
|
||||
|
|
@ -195,7 +196,7 @@ public unsafe partial class ResourceLoader
|
|||
private static void LogPath( Utf8GamePath path, bool synchronous )
|
||||
=> PluginLog.Information( $"[ResourceLoader] Requested {path} {( synchronous ? "synchronously." : "asynchronously." )}" );
|
||||
|
||||
private static void LogResource( ResourceHandle* handle, Utf8GamePath path, FullPath? manipulatedPath, object? _ )
|
||||
private static void LogResource( Structs.ResourceHandle* handle, Utf8GamePath path, FullPath? manipulatedPath, object? _ )
|
||||
{
|
||||
var pathString = manipulatedPath != null ? $"custom file {manipulatedPath} instead of {path}" : path.ToString();
|
||||
PluginLog.Information( $"[ResourceLoader] Loaded {pathString} to 0x{( ulong )handle:X}. (Refcount {handle->RefCount})" );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue