2022-12-06 00:48:11 +01:00
|
|
|
#include "core/stdafx.h"
|
|
|
|
#include "tier0/commandline.h"
|
|
|
|
#include "public/imaterialsystem.h"
|
|
|
|
#include "engine/matsys_interface.h"
|
|
|
|
|
2022-12-06 12:04:44 +01:00
|
|
|
// Disabled, as this patch **only** works if we are writing the file.
|
2022-12-07 01:03:07 +01:00
|
|
|
// See 'resource/patch/patch_r5apex.exe' for more details regarding how
|
|
|
|
// this bug has been fixed in the engine module.
|
2022-12-06 12:04:44 +01:00
|
|
|
/*
|
2022-12-06 00:48:11 +01:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Updates the material system config
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
bool UpdateCurrentVideoConfig(MaterialSystem_Config_t* pConfig)
|
|
|
|
{
|
2022-12-07 01:03:07 +01:00
|
|
|
// 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.
|
2022-12-06 00:48:11 +01:00
|
|
|
if (CommandLine()->FindParm("-forceborder"))
|
|
|
|
{
|
2022-12-07 01:03:07 +01:00
|
|
|
pConfig->m_Flags &= ~2U;
|
2022-12-06 00:48:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return v_UpdateCurrentVideoConfig(pConfig);
|
|
|
|
}
|
2022-12-06 12:04:44 +01:00
|
|
|
*/
|
2022-12-06 00:48:11 +01:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2023-01-25 02:26:52 +01:00
|
|
|
void VMatSys_Interface::Attach() const
|
2022-12-06 00:48:11 +01:00
|
|
|
{
|
2022-12-06 12:04:44 +01:00
|
|
|
//DetourAttach(&v_UpdateCurrentVideoConfig, &UpdateCurrentVideoConfig);
|
2022-12-06 00:48:11 +01:00
|
|
|
}
|
|
|
|
|
2023-01-25 02:26:52 +01:00
|
|
|
void VMatSys_Interface::Detach() const
|
2022-12-06 00:48:11 +01:00
|
|
|
{
|
2022-12-06 12:04:44 +01:00
|
|
|
//DetourDetach(&v_UpdateCurrentVideoConfig, &UpdateCurrentVideoConfig);
|
2022-12-06 00:48:11 +01:00
|
|
|
}
|