Interface between OpenRGB SDK and Terraria using DLL injection
- The DLL needs to be compiled for 32 bits as Terraria itself uses a legacy 32 bits DLL
- *.bat scripts are based on my setup, you need to adapt it
- You need to build the Open RGB SDK C++ library in 32 bits too: https://github.com/Youda008/OpenRGB-cppSDK
- OpenRGB server must be running
- Replace CUESDK_2015.dll in the Terraria folder with the one you compiled
- The game must be launched using the Terraria.exe and not the Steam launcher
During the reverse engineering, I used SDKExplorer to make call to the actual DLL used by Terraria and get the SDK version used (which is 2.10.91), that allowed me to download the correct SDK here: http://downloads.corsair.com/download?item=Files/CUE/CUESDK_2.10.91.zip
It can be used to test other DLL aswell I guess (you can use a tool like Dependencies Walker or any newer one to know what is exposed by the DLL)
I used it to get all information I could about the devices in my setup. It is usefull to map the keys mostly
- Enabling logging can cause delays in the DLL and Terraria is very strict about that and will crash if the DLL doesn't answer fast enough