From 3cf5764871a0b1253f8fcde1e8a6f3a8b8523f83 Mon Sep 17 00:00:00 2001 From: Imanol Fernandez Date: Tue, 9 Jul 2019 23:55:03 +0200 Subject: [PATCH] Fix curved-display density mismatch (#1380) --- app/src/main/cpp/Widget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/cpp/Widget.cpp b/app/src/main/cpp/Widget.cpp index 876f43a4c..0d1bbdad8 100644 --- a/app/src/main/cpp/Widget.cpp +++ b/app/src/main/cpp/Widget.cpp @@ -130,8 +130,8 @@ struct Widget::State { cylinder->GetTextureSize(textureWidth, textureHeight); const float radius = cylinder->GetCylinderRadius(); - const float surfaceWidth = (float)textureWidth / placement->density * placement->textureScale; - const float surfaceHeight = (float)textureHeight / placement->density * placement->textureScale; + const float surfaceWidth = (float)textureWidth / (placement->density * placement->textureScale); + const float surfaceHeight = (float)textureHeight / (placement->density * placement->textureScale); // Cylinder density measures the pixels for a 360 cylinder // Oculus recommends 4680px density, which is 13 pixels per degree. const float theta = (float)M_PI * surfaceWidth / (cylinderDensity * 0.5f);