v0.1.1
Dynamic loading with a RED4ext plugin
Instead of placing .xml files in r6/input/
, you can dynamically add an input file from a RED4ext plugin with a path relative to its folder (located at red4ext/plugins/<plugin_name>/inputs.xml
):
#include <InputLoader.hpp>
RED4EXT_C_EXPORT bool RED4EXT_CALL Main(RED4ext::PluginHandle aHandle,
RED4ext::EMainReason aReason,
const RED4ext::Sdk *aSdk)
{
switch (aReason) {
case RED4ext::EMainReason::Load: {
InputLoader::Add(aHandle, "inputs.xml");
}
}
return true;
}
This will prevent the .xml file from being merged if the RED4ext plugin doesn't load (when the game's version doesn't match, etc).
Requirements
- RED4ext