mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Force IsSync in certain situations.
This commit is contained in:
parent
c9c4447f3d
commit
c390b57b0f
2 changed files with 8 additions and 3 deletions
|
|
@ -163,13 +163,18 @@ public unsafe partial class ResourceLoader
|
|||
var split = gamePath.Path.Split( ( byte )'|', 3, false );
|
||||
fileDescriptor->ResourceHandle->FileNameData = split[ 2 ].Path;
|
||||
fileDescriptor->ResourceHandle->FileNameLength = split[ 2 ].Length;
|
||||
|
||||
// Force isSync = true for these calls. 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.
|
||||
var funcFound = ResourceLoadCustomization.GetInvocationList()
|
||||
.Any( f => ( ( ResourceLoadCustomizationDelegate )f )
|
||||
.Invoke( split[ 1 ], split[ 2 ], resourceManager, fileDescriptor, priority, isSync, out ret ) );
|
||||
.Invoke( split[ 1 ], split[ 2 ], resourceManager, fileDescriptor, priority, true, out ret ) );
|
||||
|
||||
if( !funcFound )
|
||||
{
|
||||
ret = DefaultLoadResource( split[ 2 ], resourceManager, fileDescriptor, priority, isSync );
|
||||
ret = DefaultLoadResource( split[ 2 ], resourceManager, fileDescriptor, priority, true );
|
||||
}
|
||||
|
||||
// Return original resource handle path so that they can be loaded separately.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
namespace Penumbra.Interop.Structs;
|
||||
|
||||
public enum FileMode : uint
|
||||
public enum FileMode : byte
|
||||
{
|
||||
LoadUnpackedResource = 0,
|
||||
LoadFileResource = 1, // The config files in MyGames use this.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue