mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
31 lines
918 B
C++
31 lines
918 B
C++
#include "core/stdafx.h"
|
|
#include "codecs/bink/bink_impl.h"
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose: opens bik video by handle, and logs any error caused during loading
|
|
// Input : hBinkFile -
|
|
// nFlags -
|
|
// Output : pointer to bik video structure, null if failed
|
|
//-----------------------------------------------------------------------------
|
|
void* BinkOpen(HANDLE hBinkFile, UINT32 nFlags)
|
|
{
|
|
void* pHandle = v_BinkOpen(hBinkFile, nFlags);
|
|
if (!pHandle)
|
|
{
|
|
// Retrieve BinkOpen error using the DLL's exported function "BinkGetError()".
|
|
Error(eDLL_T::VIDEO, NO_ERROR, "%s: %s\n", __FUNCTION__, v_BinkGetError());
|
|
}
|
|
|
|
return pHandle;
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
void BinkImpl_Attach()
|
|
{
|
|
DetourAttach(&v_BinkOpen, &BinkOpen);
|
|
}
|
|
|
|
void BinkImpl_Detach()
|
|
{
|
|
DetourDetach(&v_BinkOpen, &BinkOpen);
|
|
} |