Skip to content

Commit

Permalink
Add built-in Turbo Mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbucchia committed May 21, 2023
1 parent 16dfae9 commit 52e63b4
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 35 deletions.
58 changes: 37 additions & 21 deletions companion/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion companion/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ public MainForm()
toolTip.SetToolTip(guardianThresholdValue, "Specifies how far from your starting position you can walk before the playspace guardian appears");
toolTip.SetToolTip(guardianLabel2, "Specifies how far from your starting position you can walk before the playspace guardian appears");
toolTip.SetToolTip(guardianThreshold, "Specifies how far from your starting position you can walk before the playspace guardian appears");
toolTip.SetToolTip(preferFramerate, "When enabled, maximizing the usage of your GPU will be preferred, at the cost of extra frame latency");
toolTip.SetToolTip(allowEyeTracking, "When enabled, the eye tracker (if any) of your headset can be used by applications or for foveated rendering");
toolTip.SetToolTip(enableQuadViews, "When enabled, supported applications can take advantage of multi-view to offer foveated rendering");
toolTip.SetToolTip(enableUltraleap, "When installed and enabled, the hand tracker (if any) of your headset can be used by applications\nNOTE: This option precludes finger sensing with Index motion controllers");
Expand Down Expand Up @@ -355,6 +356,7 @@ private void LoadSettings()
guardian.Checked = (int)key.GetValue("guardian", 1) == 1 ? true : false;
guardianRadius.Value = (int)key.GetValue("guardian_radius", 1600) / 10;
guardianThreshold.Value = (int)key.GetValue("guardian_threshold", 1100) / 10;
preferFramerate.Checked = (int)key.GetValue("defer_frame_wait", 1) == 1 ? true : false;
allowEyeTracking.Checked = (int)key.GetValue("allow_eye_tracking", 0) == 1 ? true : false;
enableQuadViews.Checked = (int)key.GetValue("disable_quad_views", 1) == 0 ? true : false;
mirrorMode.Checked = (int)key.GetValue("mirror_window", 0) == 1 ? true : false;
Expand Down Expand Up @@ -387,7 +389,7 @@ private void LoadSettings()
private void RefreshEnabledState()
{
runtimeStatusLabel.Enabled = recenterMode.Enabled = recenterLabel.Enabled = controllerEmulation.Enabled = controllerEmulationLabel.Enabled =
joystickDeadzone.Enabled = joystickDeadzoneValue.Enabled = joystickLabel.Enabled = guardian.Enabled = allowEyeTracking.Enabled = enableQuadViews.Enabled =
joystickDeadzone.Enabled = joystickDeadzoneValue.Enabled = joystickLabel.Enabled = guardian.Enabled = preferFramerate.Enabled = allowEyeTracking.Enabled = enableQuadViews.Enabled =
downloadUltraleap.Enabled = mirrorMode.Enabled = enableTelemetry.Enabled = pitoolLabel.Enabled = telemetryLabel.Enabled =
runtimePimax.Checked;
guardianLabel1.Enabled = guardianLabel2.Enabled = guardianRadius.Enabled = guardianRadiusValue.Enabled = guardianThreshold.Enabled = guardianThresholdValue.Enabled = guardian.Enabled && guardian.Checked;
Expand Down Expand Up @@ -492,6 +494,15 @@ private void guardianThreshold_Scroll(object sender, EventArgs e)
guardianRadius_Scroll(null, null);
}
}
private void preferFramerate_CheckedChanged(object sender, EventArgs e)
{
if (loading)
{
return;
}

WriteSetting("defer_frame_wait", preferFramerate.Checked ? 1 : 0);
}

private void allowEyeTracking_CheckedChanged(object sender, EventArgs e)
{
Expand Down
Loading

0 comments on commit 52e63b4

Please sign in to comment.