Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd9f4d2f authored by Kevin Schoedel's avatar Kevin Schoedel
Browse files

Make VR HWC DPI a configurable property

Bug: 62833924
Test: temporary logging
Change-Id: I4e38ab9dd9ef6eb42813b3809dc38d1f103d2bf3
parent e86f70b4
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */
#include "impl/vr_hwc.h"

#include <cutils/properties.h>
#include <private/dvr/display_client.h>
#include <ui/Fence.h>

@@ -352,7 +353,14 @@ Error VrHwc::getDisplayAttribute(Display display, Config config,
      break;
    case IComposerClient::Attribute::DPI_X:
    case IComposerClient::Attribute::DPI_Y:
      *outValue = 300 * 1000;  // 300dpi
      {
        constexpr int32_t kDefaultDPI = 300;
        int32_t dpi = property_get_int32("ro.vr.hwc.dpi", kDefaultDPI);
        if (dpi <= 0) {
          dpi = kDefaultDPI;
        }
        *outValue = 1000 * dpi;
      }
      break;
    default:
      return Error::BAD_PARAMETER;