Skip to content

Commit

Permalink
OpenXR: Rework "Ignore Virtual Desktop Checks" logic
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Dec 23, 2023
1 parent 8c54fcf commit a4229fe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mods/vr/runtimes/OpenXR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ void OpenXR::on_system_properties_acquired(const XrSystemProperties& system_prop
spdlog::info("[OpenXR] OpenXR system orientation: {}", system_properties.trackingProperties.orientationTracking);
spdlog::info("[OpenXR] OpenXR system position: {}", system_properties.trackingProperties.positionTracking);

if (std::string_view{system_properties.systemName}.find("SteamVR/OpenXR") != std::string_view::npos) try {
const auto should_check_vd = !this->ignore_vd_checks->value();

if (should_check_vd && std::string_view{system_properties.systemName}.find("SteamVR/OpenXR") != std::string_view::npos) try {
spdlog::info("[OpenXR] Detected SteamVR/OpenXR, checking for Virtual Desktop Streamer...");

// Now double check that the Virtual Desktop streamer executable is running
Expand Down Expand Up @@ -1637,8 +1639,7 @@ XrResult OpenXR::end_frame(const std::vector<XrCompositionLayerBaseHeader*>& qua
// Dummy projection layers for Virtual Desktop. If we don't do this, timewarp does not work correctly on VD.
// the reasoning from ggodin (VD dev) is that VD composites all layers using the top layer's pose (apparently)
// I am actually not sure why this fixes the issue, but it does. and even makes the SteamVR overlay work completely fine.
const auto should_push_dummy = !this->ignore_vd_checks->value() &&
this->push_dummy_projection == true &&
const auto should_push_dummy = this->push_dummy_projection == true &&
!pipelined_stage_views.empty() &&
this->ever_submitted == true;

Expand Down

0 comments on commit a4229fe

Please sign in to comment.