aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/latencyflex.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-05-27 01:13:14 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-05-27 01:13:14 +0100
commit0de847bb4832c201233c87fa37867b9d89f0e8c8 (patch)
treef05add722b788d32aae40663e7748234452a3443 /NorthstarDedicatedTest/latencyflex.cpp
parent2171d95e1221442081bade7929c05b82ca0f2a08 (diff)
downloadNorthstarLauncher-0de847bb4832c201233c87fa37867b9d89f0e8c8.tar.gz
NorthstarLauncher-0de847bb4832c201233c87fa37867b9d89f0e8c8.zip
rename project folder (:tf: commit log)
Diffstat (limited to 'NorthstarDedicatedTest/latencyflex.cpp')
-rw-r--r--NorthstarDedicatedTest/latencyflex.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/NorthstarDedicatedTest/latencyflex.cpp b/NorthstarDedicatedTest/latencyflex.cpp
deleted file mode 100644
index 8c302df8..00000000
--- a/NorthstarDedicatedTest/latencyflex.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include "pch.h"
-#include "convar.h"
-
-AUTOHOOK_INIT()
-
-ConVar* Cvar_r_latencyflex;
-
-HMODULE m_lfxModule {};
-typedef void (*PFN_winelfx_WaitAndBeginFrame)();
-PFN_winelfx_WaitAndBeginFrame m_winelfx_WaitAndBeginFrame {};
-
-AUTOHOOK(OnRenderStart, client.dll + 0x1952C0,
-void,, (),
-{
- if (Cvar_r_latencyflex->GetInt())
- m_winelfx_WaitAndBeginFrame();
-
- OnRenderStart();
-})
-
-ON_DLL_LOAD_CLIENT_RELIESON("client.dll", LatencyFlex, ConVar, [](HMODULE baseAddress)
-{
- // Connect to the LatencyFleX service
- // LatencyFleX is an open source vendor agnostic replacement for Nvidia Reflex input latency reduction technology.
- // https://ishitatsuyuki.github.io/post/latencyflex/
- m_lfxModule = LoadLibraryA("latencyflex_wine.dll");
-
- if (m_lfxModule == nullptr)
- {
- spdlog::info("Unable to load LatencyFleX library, LatencyFleX disabled.");
- return;
- }
-
- AUTOHOOK_DISPATCH()
-
- m_winelfx_WaitAndBeginFrame =
- reinterpret_cast<PFN_winelfx_WaitAndBeginFrame>(reinterpret_cast<void*>(GetProcAddress(m_lfxModule, "winelfx_WaitAndBeginFrame")));
- spdlog::info("LatencyFleX initialized.");
-
- Cvar_r_latencyflex = new ConVar("r_latencyflex", "1", FCVAR_ARCHIVE, "Whether or not to use LatencyFleX input latency reduction.");
-}) \ No newline at end of file