Skip to content

Commit

Permalink
Oculus Rift: Ensure prediction latency is set
Browse files Browse the repository at this point in the history
Attempting to make sure that OculusTracker is always informed about
the configured prediction latency.
  • Loading branch information
skyjake committed Dec 23, 2013
1 parent fbfb48c commit 03ce5b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions doomsday/client/src/render/vr.cpp
Expand Up @@ -127,6 +127,12 @@ static void vrModeChanged()
if (VR::mode() == VR::MODE_OCULUS_RIFT) {
if(Con_GetFloat("rend-camera-fov") != vrRiftFovX)
Con_SetFloat("rend-camera-fov", vrRiftFovX);

if (VR::hasHeadOrientation())
{
// Update prediction latency.
VR::setRiftLatency(vrLatency);
}
}
else {
if(Con_GetFloat("rend-camera-fov") != vrNonRiftFovX)
Expand Down
3 changes: 1 addition & 2 deletions doomsday/client/src/ui/dialogs/vrsettingsdialog.cpp
Expand Up @@ -156,12 +156,11 @@ void VRSettingsDialog::autoConfigForOculusRift()
/// @todo This would be a good use case for cvar overriding. -jk

Con_SetInteger("rend-vr-mode", VR::MODE_OCULUS_RIFT);
Con_SetFloat ("view-bob-height", .3f);
Con_SetFloat ("view-bob-height", .2f);
Con_SetInteger("vid-fsaa", 0);
Con_SetFloat ("vid-gamma", 1.176f);
Con_SetFloat ("vid-contrast", 1.186f);
Con_SetFloat ("vid-bright", .034f);
//Con_SetInteger("input-sharp", 0);

d->fetch();
}
Expand Down

0 comments on commit 03ce5b0

Please sign in to comment.