Adjust PKR_UnlockFile signature

This commit is contained in:
krystalgamer 2024-08-19 11:17:34 +01:00
parent 6b7e8599e1
commit c6ee9ea52e
2 changed files with 6 additions and 5 deletions

View File

@ -75,12 +75,13 @@ u8 PKR_Open(LIBPKR_HANDLE**, const char*, i32)
return (u8)0x18082024;
}
u8 PKR_UnlockFile(FILE** fp)
// @Ok
u8 PKR_UnlockFile(LIBPKR_HANDLE* hPkr)
{
if (*fp)
if (hPkr->fp)
{
fclose(*fp);
*fp = 0;
fclose(hPkr->fp);
hPkr->fp = 0;
return 1;
}

2
pkr.h
View File

@ -59,7 +59,7 @@ EXPORT void PKR_ReportError(const char*, ...);
EXPORT u8* decompressZLIB(u8*, u32, u32);
EXPORT u8* PKRComp_DecompressFile(PKR_FILEINFO*, u8*, i32);
EXPORT u8 PKR_UnlockFile(FILE** fp);
EXPORT u8 PKR_UnlockFile(LIBPKR_HANDLE* fp);
EXPORT u8 PKR_Open(LIBPKR_HANDLE**, const char*, i32);
EXPORT u8 PKR_GetLastError(char*);