Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging a variety of fixes into main #131

Merged
merged 8 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
branch: ${{ github.ref }}

build-linux:
needs: build-windows
Expand Down Expand Up @@ -105,4 +105,4 @@ jobs:
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
branch: ${{ github.ref }}
4 changes: 2 additions & 2 deletions Providers/Display/Display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -763,9 +763,9 @@ bool OpenVRDisplayProvider::SubmitToCompositor( vr::EVREye eEye, int nStage )
tex.eColorSpace = vr::ColorSpace_Auto;

// Check if we have a valid depth buffer
if (m_pNativeDepthTextures[eEye][nStage])
if (m_pNativeDepthTextures[nStage][nTexIndex])
{
tex.depth.handle = m_pNativeDepthTextures[eEye][nStage];
tex.depth.handle = m_pNativeDepthTextures[nStage][nTexIndex];
}

if ( !m_bIsOverlayApplication )
Expand Down
2 changes: 1 addition & 1 deletion Providers/Input/Input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ void OpenVRInputProvider::OpenVRToUnityTracking( const vr::TrackedDevicePose_t &
if ( postTransform )
{
XRMatrix4x4 &xrTrackingTransformRef = reinterpret_cast< XRMatrix4x4 & >( trackingToReference );
xrTrackingTransformRef *= reinterpret_cast< XRMatrix4x4 & >( *postTransform );
xrTrackingTransformRef = reinterpret_cast< XRMatrix4x4 & >( *postTransform ) * xrTrackingTransformRef;
}

outPosition.x = trackingToReference.columns[3].x;
Expand Down
14 changes: 14 additions & 0 deletions Providers/UserProjectSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,15 @@ SetUserDefinedSettings( UserDefinedSettings settings )

if ( settings.actionManifestPath && strlen( settings.actionManifestPath ) > 1 )
{
#ifdef __linux__
size_t actionManifestPathLength = strlen( settings.actionManifestPath );
std::string actionManifestPath = settings.actionManifestPath;
std::replace( actionManifestPath.begin(), actionManifestPath.end(), '\\', '/' );
char *updatedActionManifestPath = new char[ actionManifestPathLength ];
std::copy( actionManifestPath.begin(), actionManifestPath.end(), updatedActionManifestPath );
settings.actionManifestPath = updatedActionManifestPath;
#endif

if ( UserProjectSettings::FileExists( std::string( settings.actionManifestPath ) ) )
{
size_t strLen = strlen( settings.actionManifestPath ) + 1;
Expand All @@ -504,7 +513,12 @@ SetUserDefinedSettings( UserDefinedSettings settings )
{
XR_TRACE( "[OpenVR] [path] %s\n", UserProjectSettings::GetCurrentWorkingPath().c_str() );

#ifndef __linux__
std::string fullPath = UserProjectSettings::GetCurrentWorkingPath() + "\\Assets\\" + settings.actionManifestPath;
#else
std::string fullPath = UserProjectSettings::GetCurrentWorkingPath() + "/Assets/" + settings.actionManifestPath;
#endif

char *actionManifestPath = new char[fullPath.size() + 1];
std::copy( fullPath.begin(), fullPath.end(), actionManifestPath );
actionManifestPath[fullPath.size()] = '\0';
Expand Down
10 changes: 10 additions & 0 deletions com.valve.openvr/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to this package will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.2.0] - 2023-03-22
### Added
- Added limited OpenGL support (multipass only)
### Changed
- Updated to SteamVR SDK 1.23.7
- Fix for unity projects set to binary serialization
- Fix for unnecessary preinit #80
- Fix for incorrect reporting of eye position #86
- Fix for broken depth textures in some situations #110

## [1.1.5] - 2021-11-08
### Changed
- Fixed issue with unicode paths / project names not working #108
Expand Down
2 changes: 2 additions & 0 deletions com.valve.openvr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ For now, to get access to controllers and other forms of input you will need to
* In some circumstances the unity console will show errors on start saying "screen position out of view frustrum". This should not impact visuals.
* OpenVR Mirror View Mode (default) can cause black screens in the game view. Please send us bug reports if this happens.
* OpenVR Mirror View Mode requires use of Linear Color Space (Project Settings > Player > Other Settings > (Rendering) Color Space)
* Linux - Vulkan - Multipass will crash.
* Linux - OpenGL - Single Pass Instanced will crash.



Expand Down
2 changes: 1 addition & 1 deletion com.valve.openvr/Runtime/OpenVRLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ public static void TickCallback(int value)
#if UNITY_EDITOR
public string GetPreInitLibraryName(BuildTarget buildTarget, BuildTargetGroup buildTargetGroup)
{
return "XRSDKOpenVR";
return null;
}

private static void DisableTickOnReload()
Expand Down
Loading
Loading