mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Do not force avfx files to load synchronously.
This commit is contained in:
parent
2dda954806
commit
0b7b63a3a9
1 changed files with 15 additions and 12 deletions
|
|
@ -19,7 +19,7 @@ public unsafe partial class PathResolver
|
||||||
// Materials and avfx do contain their own paths to textures and shader packages or atex respectively.
|
// Materials and avfx do contain their own paths to textures and shader packages or atex respectively.
|
||||||
// Those are loaded synchronously.
|
// Those are loaded synchronously.
|
||||||
// Thus, we need to ensure the correct files are loaded when a material is loaded.
|
// Thus, we need to ensure the correct files are loaded when a material is loaded.
|
||||||
public class SubfileHelper : IDisposable, IReadOnlyCollection<KeyValuePair<IntPtr, ResolveData>>
|
public class SubfileHelper : IDisposable, IReadOnlyCollection< KeyValuePair< IntPtr, ResolveData > >
|
||||||
{
|
{
|
||||||
private readonly ResourceLoader _loader;
|
private readonly ResourceLoader _loader;
|
||||||
|
|
||||||
|
|
@ -133,24 +133,27 @@ public unsafe partial class PathResolver
|
||||||
|
|
||||||
// We need to set the correct collection for the actual material path that is loaded
|
// We need to set the correct collection for the actual material path that is loaded
|
||||||
// before actually loading the file.
|
// before actually loading the file.
|
||||||
public bool SubfileLoadHandler( ByteString split, ByteString path, ResourceManager* resourceManager,
|
public static bool SubfileLoadHandler( ByteString split, ByteString path, ResourceManager* resourceManager,
|
||||||
SeFileDescriptor* fileDescriptor, int priority, bool isSync, out byte ret )
|
SeFileDescriptor* fileDescriptor, int priority, bool isSync, out byte ret )
|
||||||
{
|
{
|
||||||
ret = 0;
|
|
||||||
switch( fileDescriptor->ResourceHandle->FileType )
|
switch( fileDescriptor->ResourceHandle->FileType )
|
||||||
{
|
{
|
||||||
case ResourceType.Mtrl:
|
case ResourceType.Mtrl:
|
||||||
|
// Force isSync = true for this call. I don't really understand why,
|
||||||
|
// or where the difference even comes from.
|
||||||
|
// Was called with True on my client and with false on other peoples clients,
|
||||||
|
// which caused problems.
|
||||||
|
ret = Penumbra.ResourceLoader.DefaultLoadResource( path, resourceManager, fileDescriptor, priority, true );
|
||||||
|
return true;
|
||||||
case ResourceType.Avfx:
|
case ResourceType.Avfx:
|
||||||
break;
|
// Do nothing special right now.
|
||||||
default: return false;
|
ret = Penumbra.ResourceLoader.DefaultLoadResource( path, resourceManager, fileDescriptor, priority, isSync );
|
||||||
}
|
return true;
|
||||||
|
|
||||||
// Force isSync = true for this call. I don't really understand why,
|
default:
|
||||||
// or where the difference even comes from.
|
ret = 0;
|
||||||
// Was called with True on my client and with false on other peoples clients,
|
return false;
|
||||||
// which caused problems.
|
}
|
||||||
ret = Penumbra.ResourceLoader.DefaultLoadResource( path, resourceManager, fileDescriptor, priority, true );
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private delegate byte LoadMtrlFilesDelegate( IntPtr mtrlResourceHandle );
|
private delegate byte LoadMtrlFilesDelegate( IntPtr mtrlResourceHandle );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue