Allow mapping half axes to buttons

This allows to bind pressure sensitive NeGcon buttons to keyboard,
mouse and controller buttons
This commit is contained in:
Silent
2020-08-29 14:19:28 +02:00
parent 79aaf908a6
commit 057bf986c4
17 changed files with 306 additions and 171 deletions

View File

@ -219,12 +219,12 @@ std::optional<s32> NeGcon::StaticGetButtonCodeByName(std::string_view button_nam
Controller::AxisList NeGcon::StaticGetAxisNames()
{
#define A(n) \
#define A(n, t) \
{ \
#n, static_cast <s32>(Axis::n) \
#n, static_cast <s32>(Axis::n), Controller::AxisType::t \
}
return {A(Steering), A(I), A(II), A(L)};
return {A(Steering, Full), A(I, Half), A(II, Half), A(L, Half)};
#undef A
}