mirror of
https://github.com/lbgos/rift-s-linux.git
synced 2026-10-28 08:01:21 +01:00
xrt: Switch scannout duration to int64_t
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2616>
This commit is contained in:
1 parent
ddb446f468
commit
51ffd9e011
4 files changed
+5
-5
No files matched your search
@@ -259,7 +259,7 @@ calc_pose_data(struct comp_renderer *r,
|
||||
struct xrt_fov xdev_fovs[XRT_MAX_VIEWS] = XRT_STRUCT_INIT;
|
||||
struct xrt_pose xdev_poses[2][XRT_MAX_VIEWS] = XRT_STRUCT_INIT;
|
||||
|
||||
uint64_t scanout_time_ns = 0;
|
||||
int64_t scanout_time_ns = 0;
|
||||
if (r->c->xdev->hmd->screens[0].scanout_direction == XRT_SCANOUT_DIRECTION_TOP_TO_BOTTOM) {
|
||||
scanout_time_ns = r->c->xdev->hmd->screens[0].scanout_time_ns;
|
||||
} else if (r->c->xdev->hmd->screens[0].scanout_direction != XRT_SCANOUT_DIRECTION_NONE) {
|
||||
|
||||
@@ -868,7 +868,7 @@ HmdDevice::set_nominal_frame_interval(uint64_t interval_ns)
|
||||
}
|
||||
|
||||
void
|
||||
HmdDevice::set_scanout_type(xrt_scanout_direction direction, uint64_t time_ns)
|
||||
HmdDevice::set_scanout_type(xrt_scanout_direction direction, int64_t time_ns)
|
||||
{
|
||||
auto set = [this, direction, time_ns] {
|
||||
hmd_parts->base.screens[0].scanout_direction = direction;
|
||||
@@ -1047,7 +1047,7 @@ HmdDevice::handle_property_write(const vr::PropertyWrite_t &prop)
|
||||
case vr::Prop_DisplayFrequency_Float: {
|
||||
assert(prop.unBufferSize == sizeof(float));
|
||||
float freq = *static_cast<float *>(prop.pvBuffer);
|
||||
uint64_t interval_ns = (1.f / freq) * 1e9f;
|
||||
int64_t interval_ns = (1.f / freq) * 1e9f;
|
||||
set_nominal_frame_interval(interval_ns);
|
||||
if (variant == VIVE_VARIANT_PRO) {
|
||||
set_scanout_type(XRT_SCANOUT_DIRECTION_TOP_TO_BOTTOM, interval_ns * 1600.0 / 1624.0);
|
||||
|
||||
@@ -211,7 +211,7 @@ private:
|
||||
set_nominal_frame_interval(uint64_t interval_ns);
|
||||
|
||||
void
|
||||
set_scanout_type(enum xrt_scanout_direction direction, uint64_t time_ns);
|
||||
set_scanout_type(enum xrt_scanout_direction direction, int64_t time_ns);
|
||||
|
||||
std::condition_variable hmd_parts_cv;
|
||||
std::mutex hmd_parts_mut;
|
||||
|
||||
@@ -103,7 +103,7 @@ struct xrt_hmd_parts
|
||||
//! Nominal frame interval
|
||||
uint64_t nominal_frame_interval_ns;
|
||||
enum xrt_scanout_direction scanout_direction;
|
||||
uint64_t scanout_time_ns;
|
||||
int64_t scanout_time_ns;
|
||||
} screens[1];
|
||||
|
||||
/*!
|
||||
|
||||
Reference in new issue
Block a user