mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Update '-forceborder' comments and add patch documentation file
The documentation file for all patches applied to 'r5apex.exe' could be found in 'r5dev/resource/patch/r5apex.patch'. This is a text file containing the offset to the patch and its original instructions followed by the new instructions.
This commit is contained in:
parent
2a76cf40fb
commit
138e7d99af
@ -4,26 +4,21 @@
|
||||
#include "engine/matsys_interface.h"
|
||||
|
||||
// Disabled, as this patch **only** works if we are writing the file.
|
||||
// See 'resource/ptc/' for more details regarding how this bug has been
|
||||
// fixed in the engine module.
|
||||
// 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.
|
||||
// Both feature the or instruction, there was unfortunately not
|
||||
// enough bytes left to assemble a 'not and' operation to mitigate
|
||||
// this bug without code caves, which is why we create this hook to remove the
|
||||
// flag after it has been ran in 'OverrideMaterialSystemConfigFromCommandLine',
|
||||
// but before 'UpdateCurrentVideoConfig' so that the file gets created properly.
|
||||
// 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 &= ~3U;
|
||||
pConfig->m_Flags &= ~2U;
|
||||
}
|
||||
|
||||
return v_UpdateCurrentVideoConfig(pConfig);
|
||||
|
1
r5dev/resource/patch/r5apex.patch
Normal file
1
r5dev/resource/patch/r5apex.patch
Normal file
@ -0,0 +1 @@
|
||||
0x249DEE: "or byte ptr [rdi+14h], 3" --> "and byte ptr [rdi+14h], 0FDh"; // This fixes an engine bug where '-forceborder' did not force the border over the application window.
|
Loading…
x
Reference in New Issue
Block a user