JonnyHaystack / HayBox

Modular cross-platform firmware for digital or mixed analog/digital game controllers
GNU General Public License v3.0
166 stars 168 forks source link

SOCD revamp #57

Closed JonnyHaystack closed 11 months ago

JonnyHaystack commented 11 months ago

socd_type is no longer a required parameter of InputMode(). Instead, a SocdType is included as part of each SocdPair, allowing SOCD resolution method to be defined per-axis without the need to override HandleSocd().

New SOCD resolution methods SOCD_DIR1_PRIORITY and SOCD_DIR2_PRIORITY have been added, which was made possible by the above change. These would previously not have been useful, without the ability to define SocdType per SocdPair.

The constructor of FgcMode now accepts two parameters, horizontal_socd and vertical_socd, which can be used to set the SOCD resolution method for the horizontal and vertical axes separately.

The default vertical SOCD resolution for FgcMode is now SOCD_NEUTRAL, due to this being a requirement in some rulesets. This can easily be changed by passing socd::SOCD_DIR2_PRIORITY as the second argument to the constructor in src/config/mode_selection.hpp.