A program to detour the XInput dll injected into a game. Specifically, this repo uses Rocket League as the example game. It also provides a function scheduler which allows the user to pass delays for when an input should be run on the controller. Chaining such delays allows for the simple creation of macro buttons on a controller.
You will need Rust and Rocket League to view the example. Rocket League is free on Epic Games (not sponsored).
- Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Clone the repo
git clone https://github.com/DavidAngell/rusty-xinput-detour cd rusty-xinput-detour/
- Build the DLL
cd xinput_detour_dll/ cargo build
- Run the injector script (must be in the root directory)
cd .. cargo run
Editing main.rs
- Change the value of
EXE_NAME
to match the name of the exe you want to detour - IMPORTANT: if you change the lib name in Cargo.toml it will change the name of the genrated dll. You will need to change
DLL_NAME
at the top of main.rs to match whatever lib name you choose
See examples in handle_controller_state.rs to get an understanding of how function scheduler works.
If you have a suggestion that would make this program better, please fork the repo and create a pull request. Thank You.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
David Angell - @DavidJAngell42 - davidjangell42@gmail.com