F4MP/tiltedcode/Code/client/Games/Skyrim/BSInput/BSInputDeviceManager.cpp
Jous99 37b16f1547 code upload
codigo original de f4mp y tilted para referencias
2026-01-06 18:45:00 +01:00

24 lines
800 B
C++

#include <BSGraphics/BSGraphicsRenderer.h>
struct BSInputDeviceManager;
void (*BSInputDeviceManager_PollInputDevices)(BSInputDeviceManager*, float) = nullptr;
void Hook_BSInputDeviceManager_PollInputDevices(BSInputDeviceManager* inputDeviceMgr, float afDelta)
{
if (!BSGraphics::GetMainWindow()->IsForeground())
return;
BSInputDeviceManager_PollInputDevices(inputDeviceMgr, afDelta);
}
static TiltedPhoques::Initializer s_initInputDeviceManager(
[]()
{
const VersionDbPtr<void> pollInputDevices(68617);
BSInputDeviceManager_PollInputDevices = static_cast<decltype(BSInputDeviceManager_PollInputDevices)>(pollInputDevices.GetPtr());
TP_HOOK_IMMEDIATE(&BSInputDeviceManager_PollInputDevices, &Hook_BSInputDeviceManager_PollInputDevices);
});