Skip to content

Releases: fredemmott/cpp-remapper

v0.3.1: shift modes, more flexible hat-to-buttons, fixed unhidden devices

17 Sep 17:04
v0.3.1
2d4ab1d
Compare
Choose a tag to compare
  • added Shift class (see README.md)
  • added optional HatToButtons::Interpolation::None first argument for HatToButtons, so e.g. pointing hat NE will not press N or E 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

09 Jan 15:20
38198e3
Compare
Choose a tag to compare

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 to Source<T> and Sink<T>
  • inputs are a Source<T> (e.g. stick.Button1 is a Source<Button>) and outputs are a Sink<T> (e.g. vjoy.Button1 is a Sink<Button>)
  • most actions are both sinks and sources, but the T can vary; for example, ButtonToAxis is a Sink<Button> and a Source<Axis>
  • ButtonSink, ButtonSource, AxisSource ... are defined as aliases for Sink<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

v0.2: use HidHide

15 Nov 15:39
26fdc95
Compare
Choose a tag to compare

This release is identical to v0.1, except that it uses HidHide instead of HidGuardian.

v0.1: Final release supporting HidGuardian

15 Nov 15:38
4164926
Compare
Choose a tag to compare

This is the final release using the legacy HidGuardian software; future releases will use HidHide instead.