Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Enable 72hz display rate in Oculus Go (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro authored May 21, 2019
1 parent 6092974 commit 35c8790
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,17 @@ struct DeviceDelegateOculusVR::State {
}
}

void UpdateDisplayRefreshRate() {
if (!ovr || !IsOculusGo()) {
return;
}
if (renderMode == device::RenderMode::StandAlone) {
vrapi_SetDisplayRefreshRate(ovr, 72.0f);
} else {
vrapi_SetDisplayRefreshRate(ovr, 60.0f);
}
}

void AddUILayer(const OculusLayerPtr& aLayer, VRLayerSurface::SurfaceType aSurfaceType) {
if (ovr) {
vrb::RenderContextPtr ctx = context.lock();
Expand Down Expand Up @@ -1065,6 +1076,7 @@ DeviceDelegateOculusVR::SetRenderMode(const device::RenderMode aMode) {

m.UpdateTrackingMode();
m.UpdateFoveatedLevel();
m.UpdateDisplayRefreshRate();
m.UpdateClockLevels();

// Reset reorient when exiting or entering immersive
Expand Down Expand Up @@ -1542,6 +1554,7 @@ DeviceDelegateOculusVR::EnterVR(const crow::BrowserEGLContext& aEGLContext) {
} else {
vrapi_SetPerfThread(m.ovr, VRAPI_PERF_THREAD_TYPE_MAIN, gettid());
vrapi_SetPerfThread(m.ovr, VRAPI_PERF_THREAD_TYPE_RENDERER, gettid());
m.UpdateDisplayRefreshRate();
m.UpdateClockLevels();
m.UpdateTrackingMode();
m.UpdateFoveatedLevel();
Expand Down

0 comments on commit 35c8790

Please sign in to comment.