Fix Turntable extension's table range
This commit is contained in:
parent
1b333727e9
commit
a32b85691b
|
@ -96,7 +96,7 @@ void Turntable::BuildDesiredExtensionState(DesiredExtensionState* target_state)
|
|||
// left table
|
||||
{
|
||||
const ControllerEmu::Slider::StateData lt = m_left_table->GetState(m_input_override_function);
|
||||
const s8 tt = MapFloat<u8>(lt.value, 0, 0, TABLE_RANGE);
|
||||
const s8 tt = MapFloat<s8>(lt.value, 0, -TABLE_RANGE, TABLE_RANGE);
|
||||
|
||||
tt_data.ltable1 = tt;
|
||||
tt_data.ltable2 = tt >> 5;
|
||||
|
@ -105,7 +105,7 @@ void Turntable::BuildDesiredExtensionState(DesiredExtensionState* target_state)
|
|||
// right table
|
||||
{
|
||||
const ControllerEmu::Slider::StateData rt = m_right_table->GetState(m_input_override_function);
|
||||
const s8 tt = MapFloat<u8>(rt.value, 0, 0, TABLE_RANGE);
|
||||
const s8 tt = MapFloat<s8>(rt.value, 0, -TABLE_RANGE, TABLE_RANGE);
|
||||
|
||||
tt_data.rtable1 = tt;
|
||||
tt_data.rtable2 = tt >> 1;
|
||||
|
|
|
@ -83,7 +83,7 @@ public:
|
|||
static constexpr u8 STICK_GATE_RADIUS = 0x16;
|
||||
|
||||
static constexpr int TABLE_BIT_COUNT = 6;
|
||||
static constexpr u8 TABLE_RANGE = (1 << STICK_BIT_COUNT) / 2 - 1;
|
||||
static constexpr u8 TABLE_RANGE = (1 << TABLE_BIT_COUNT) / 2 - 1;
|
||||
|
||||
static constexpr int EFFECT_DIAL_BIT_COUNT = 5;
|
||||
static constexpr u8 EFFECT_DIAL_CENTER = (1 << EFFECT_DIAL_BIT_COUNT) / 2;
|
||||
|
|
Loading…
Reference in New Issue