mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
potential (read: i didn't test) fix for #36
This commit is contained in:
parent
9decf26ab6
commit
ae62f0666d
1 changed files with 5 additions and 0 deletions
|
|
@ -196,6 +196,11 @@ namespace Penumbra.Interop
|
||||||
|
|
||||||
private unsafe byte ReadSqpackHandler( IntPtr pFileHandler, SeFileDescriptor* pFileDesc, int priority, bool isSync )
|
private unsafe byte ReadSqpackHandler( IntPtr pFileHandler, SeFileDescriptor* pFileDesc, int priority, bool isSync )
|
||||||
{
|
{
|
||||||
|
if( ( IntPtr )pFileDesc == IntPtr.Zero || ( IntPtr )pFileDesc->FileDescriptor == IntPtr.Zero )
|
||||||
|
{
|
||||||
|
return ReadSqpackHook?.OriginalFunction( pFileHandler, pFileDesc, priority, isSync ) ?? 0;
|
||||||
|
}
|
||||||
|
|
||||||
var gameFsPath = Marshal.PtrToStringAnsi( new IntPtr( pFileDesc->ResourceHandle->FileName ) );
|
var gameFsPath = Marshal.PtrToStringAnsi( new IntPtr( pFileDesc->ResourceHandle->FileName ) );
|
||||||
|
|
||||||
var isRooted = Path.IsPathRooted( gameFsPath );
|
var isRooted = Path.IsPathRooted( gameFsPath );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue