Releases: fredemmott/cpp-remapper
v0.3.1: shift modes, more flexible hat-to-buttons, fixed unhidden devices
- added
Shift
class (see README.md) - added optional
HatToButtons::Interpolation::None
first argument forHatToButtons
, so e.g. pointing hat NE will not pressN
orE
buttons - fixed
UnhiddenDevice
- fixed releasing already-released buttons on DS4 and X360 outputs; this is particularly visible when using
HatToButtons
- added
control
concept, representing a Hat, Axis, or Button
Full Changelog: v0.3.0...v0.3.1
v0.3: C++ 20, New pipeline API, DS4 and X360 emulation, more transformations
This is a major release, including:
- API improvements
- DS4 and X360 emulation
- Many new actions
API Changes
This release is a rewrite of the API, giving more flexibility; additionally, C++20 is now required. If your profile or extensions have any errors, I strongly recommend building with Clang instead of Visual Studio while debugging; Visual Studio 2019 and 2022 work, however when something is broken, Clang gives significantly clearer and more detailed error messages for some C++20 features.
v0.2 Example
#include "easymode.h"
int main() {
auto [p, stick, vjoy] = create_profile(VPC_RIGHT_WARBRD, VJOY_1);
p->passthrough(stick, vjoy);
p->map(stick.Button1, vjoy.Button1);
p->map(
stick.XAxis,
SquareDeadzone(
10,
AxisCurve(
-0.5,
vjoy.XAxis)));
p->run();
return 0;
}
v0.3 Example
#include "easymode.h"
int main() {
auto [p, stick, vjoy] = create_profile(VPC_RIGHT_WARBRD, VJOY_1);
stick >> vjoy;
stick.Button1 >> vjoy.Button1;
stick.XAxis
>> SquareDeadzone(10_percent)
>> AxisCurve(-0.5)
>> vjoy.XAxis;
p.run();
return 0;
}
Action API changes
This section is only relevant if you are implementing your own actions.
std::function
(e.g. lambdas) remains supported- the
Action
class has been removed, and separated toSource<T>
andSink<T>
- inputs are a
Source<T>
(e.g.stick.Button1
is aSource<Button>
) and outputs are aSink<T>
(e.g.vjoy.Button1
is aSink<Button>
) - most actions are both sinks and sources, but the
T
can vary; for example,ButtonToAxis
is aSink<Button>
and aSource<Axis>
ButtonSink
,ButtonSource
,AxisSource
... are defined as aliases forSink<Button>
etc for convenience
DS4 and X360 controller emulation
If ViGEmBus is installed, DS4 and X360 controllers can be emulated in addition to VJoy devices.
For example:
auto [p, stick, x360] = create_profile(VPC_RIGHT_WARBRD, VIGEM_X360_PAD);
stick.Button1 >> x360.ButtonX;
For a full example, see my BF2042 profile.
Additional Actions
v0.2 included:
- AxisCurve
- AxisToButtons
- AxisToHat
- ShortPressLongPress
- SquareDeadzone
v0.3 adds:
- AxisTrimmer
- ButtonToAxis
- HatToButtons
- LatchedToMomentaryButton
- MomentaryToLatchedButton
Learn More
- Most features and usage are documented in the README
- The unit tests can be useful to see how a particular action works
- My profiles may be useful as full examples.
v0.2: use HidHide
This release is identical to v0.1, except that it uses HidHide instead of HidGuardian.
v0.1: Final release supporting HidGuardian
This is the final release using the legacy HidGuardian software; future releases will use HidHide instead.