Add patches and dashboard setting for maximum steamvr_lh pose prediction

This commit is contained in:
Sapphire
2026-08-29 15:24:53 -05:00
parent 15716d04c6
commit 28a8fbd743
9 changed files with 268 additions and 1 deletions
+35
View File
@@ -121,6 +121,8 @@ void Settings::emitAllChanged()
openvrChanged();
debugGuiChanged();
steamVrLhChanged();
lhMaxExtrapolationEnabledChanged();
lhMaxExtrapolationChanged();
lhStickDeadzoneChanged();
hidForwardingChanged();
portChanged();
@@ -417,6 +419,39 @@ void Settings::set_steamVrLh(const bool & value)
steamVrLhChanged();
}
bool Settings::lhMaxExtrapolationEnabled() const
{
auto it = m_jsonSettings.find("lh-max-extrapolation");
return it != m_jsonSettings.end() and it->is_number();
}
int64_t Settings::lhMaxExtrapolation() const
{
auto it = m_jsonSettings.find("lh-max-extrapolation");
if (it != m_jsonSettings.end() and it->is_number())
return static_cast<int64_t>(*it);
return 50;
}
void Settings::set_lhMaxExtrapolation(const int64_t & value)
{
auto old = lhMaxExtrapolation();
if (value != -1)
{
m_jsonSettings["lh-max-extrapolation"] = value;
}
else
{
m_jsonSettings.erase("lh-max-extrapolation");
}
if (old != value)
{
lhMaxExtrapolationEnabledChanged();
lhMaxExtrapolationChanged();
}
}
float Settings::lhStickDeadzone() const
{
auto it = m_jsonSettings.find("lh-stick-deadzone");