// Installs XInput hooks inside the target game so it reads the controller state // the host forwards over shared memory -- and nothing else. #pragma once #include "ipc_client.hpp" namespace coop::hook { // Locates the loaded XInput module(s) and hooks the state/capability entry // points. `ipc` must outlive the hooks. Returns true if at least one module was // hooked. Safe to call repeatedly while waiting for xinput to load. bool install_xinput_hooks(IpcClient& ipc); // Removes all installed hooks (best effort; used on DLL detach). void remove_xinput_hooks(); } // namespace coop::hook