Input: Improve setting of dpd_enable_fg (#1127)

This commit is contained in:
capitalistspz 2024-05-06 02:27:30 +01:00 committed by GitHub
parent bd13d4bdc3
commit 7d6d417354
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 51 additions and 3 deletions

View file

@ -766,14 +766,20 @@ void WiimoteControllerProvider::calculate_ir_position(WiimoteState& wiimote_stat
ir.middle = ir.position;
ir.distance = glm::length(ir.dots[indices.first].pos - ir.dots[indices.second].pos);
ir.indices = indices;
ir.m_positionVisibility = PositionVisibility::FULL;
}
else if (ir.dots[indices.first].visible)
{
ir.position = ir.middle + (ir.dots[indices.first].pos - ir.prev_dots[indices.first].pos);
ir.m_positionVisibility = PositionVisibility::PARTIAL;
}
else if (ir.dots[indices.second].visible)
{
ir.position = ir.middle + (ir.dots[indices.second].pos - ir.prev_dots[indices.second].pos);
ir.m_positionVisibility = PositionVisibility::PARTIAL;
}
else {
ir.m_positionVisibility = PositionVisibility::NONE;
}
}