aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/demofixes.cpp
diff options
context:
space:
mode:
authorBobTheBob9 <for.oliver.kirkham@gmail.com>2022-07-07 21:31:41 +0100
committerBobTheBob9 <for.oliver.kirkham@gmail.com>2022-07-07 21:31:41 +0100
commit2ae34b67e36b8ba05132d481876eb4ed7a826283 (patch)
tree63f44c8e2dcdc959d7a5317a3a7b36efedbd7d38 /NorthstarDLL/demofixes.cpp
parent3406de7aaaf52cbef20b1549f2d7da0255d30f51 (diff)
downloadNorthstarLauncher-2ae34b67e36b8ba05132d481876eb4ed7a826283.tar.gz
NorthstarLauncher-2ae34b67e36b8ba05132d481876eb4ed7a826283.zip
almost fully replaced hooking lib
Diffstat (limited to 'NorthstarDLL/demofixes.cpp')
-rw-r--r--NorthstarDLL/demofixes.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/NorthstarDLL/demofixes.cpp b/NorthstarDLL/demofixes.cpp
index ff06ae12..293c101c 100644
--- a/NorthstarDLL/demofixes.cpp
+++ b/NorthstarDLL/demofixes.cpp
@@ -1,27 +1,27 @@
-#include "pch.h"
-#include "convar.h"
-#include "NSMem.h"
-
-ON_DLL_LOAD_CLIENT("engine.dll", EngineDemoFixes, [](HMODULE baseAddress)
-{
- // allow demo recording on loopback
- NSMem::NOP((uintptr_t)baseAddress + 0x8E1B1, 2);
- NSMem::NOP((uintptr_t)baseAddress + 0x56CC3, 2);
-})
-
-ON_DLL_LOAD_CLIENT_RELIESON("client.dll", ClientDemoFixes, ConVar, [](HMODULE baseAddress)
-{
- // change default values of demo cvars to enable them by default, but not autorecord
- // this is before Host_Init, the setvalue calls here will get overwritten by custom cfgs/launch options
- ConVar* Cvar_demo_enableDemos = R2::g_pCVar->FindVar("demo_enabledemos");
- Cvar_demo_enableDemos->m_pszDefaultValue = "1";
- Cvar_demo_enableDemos->SetValue(true);
-
- ConVar* Cvar_demo_writeLocalFile = R2::g_pCVar->FindVar("demo_writeLocalFile");
- Cvar_demo_writeLocalFile->m_pszDefaultValue = "1";
- Cvar_demo_writeLocalFile->SetValue(true);
-
- ConVar* Cvar_demo_autoRecord = R2::g_pCVar->FindVar("demo_autoRecord");
- Cvar_demo_autoRecord->m_pszDefaultValue = "0";
- Cvar_demo_autoRecord->SetValue(false);
+#include "pch.h"
+#include "convar.h"
+#include "NSMem.h"
+
+ON_DLL_LOAD_CLIENT("engine.dll", EngineDemoFixes, [](HMODULE baseAddress)
+{
+ // allow demo recording on loopback
+ NSMem::NOP((uintptr_t)baseAddress + 0x8E1B1, 2);
+ NSMem::NOP((uintptr_t)baseAddress + 0x56CC3, 2);
+})
+
+ON_DLL_LOAD_CLIENT_RELIESON("client.dll", ClientDemoFixes, ConVar, [](HMODULE baseAddress)
+{
+ // change default values of demo cvars to enable them by default, but not autorecord
+ // this is before Host_Init, the setvalue calls here will get overwritten by custom cfgs/launch options
+ ConVar* Cvar_demo_enableDemos = R2::g_pCVar->FindVar("demo_enabledemos");
+ Cvar_demo_enableDemos->m_pszDefaultValue = "1";
+ Cvar_demo_enableDemos->SetValue(true);
+
+ ConVar* Cvar_demo_writeLocalFile = R2::g_pCVar->FindVar("demo_writeLocalFile");
+ Cvar_demo_writeLocalFile->m_pszDefaultValue = "1";
+ Cvar_demo_writeLocalFile->SetValue(true);
+
+ ConVar* Cvar_demo_autoRecord = R2::g_pCVar->FindVar("demo_autoRecord");
+ Cvar_demo_autoRecord->m_pszDefaultValue = "0";
+ Cvar_demo_autoRecord->SetValue(false);
}) \ No newline at end of file