r5sdk/r5dev/engine/matsys_interface.cpp
Kawe Mazidjatari 144d5f62e1 IDetour: code refactor
Utilize the new IDetour::DetourSetup() code, IDetour::Attach and IDetour::Detach have been removed in favor of this (significantly reduces chance of user error). Since the template check happens in the idetour header, it is much more aggressive on type mismatches, such as a difference in parameter types, between the function and detour, will now raise a compile time error. As a result, some type mismatches have been fixed in this commit as well.
2024-04-05 16:41:09 +02:00

33 lines
1.2 KiB
C++

#include "core/stdafx.h"
#include "tier0/commandline.h"
#include "public/imaterialsystem.h"
#include "engine/matsys_interface.h"
// Disabled, as this patch **only** works if we are writing the file.
// See 'resource/patch/patch_r5apex.exe' for more details regarding how
// this bug has been fixed in the engine module.
/*
//-----------------------------------------------------------------------------
// Updates the material system config
//-----------------------------------------------------------------------------
bool UpdateCurrentVideoConfig(MaterialSystem_Config_t* pConfig)
{
// This is a bug in Respawn's engine. In
// 'OverrideMaterialSystemConfigFromCommandLine', they added
// a cmdline check for '-noborder' and '-forceborder'. However,
// '-noborder' and 'forceborder' perform the exact same operation.
if (CommandLine()->FindParm("-forceborder"))
{
pConfig->m_Flags &= ~2U;
}
return v_UpdateCurrentVideoConfig(pConfig);
}
*/
///////////////////////////////////////////////////////////////////////////////
void VMatSys_Interface::Detour(const bool bAttach) const
{
//DetourSetup(&v_UpdateCurrentVideoConfig, &UpdateCurrentVideoConfig, bAttach);
}