From 8e77a5d90e2bc27c55d5973b631d55030c4e9224 Mon Sep 17 00:00:00 2001 From: OneUp Date: Fri, 12 Jul 2024 21:33:02 -0500 Subject: [PATCH] Fix lack of proximity sensor pausing games --- README.md | 6 +++--- vrto3d/src/hmd_device_driver.cpp | 4 ++++ vrto3d/vrto3d/resources/settings/default.vrsettings | 8 ++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e1ed4f7..5365f99 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Windows-only solution, but there are other solutions on Linux like MonadoVR. | `user_convergence#` | `float` | The convergence value for user setting # (replace # with integer number) | `0.1` | -## Base Installation {#base-install} +## Base Installation - Get a multi-display configuration setup (see notes) - Install SteamVR @@ -55,7 +55,7 @@ Windows-only solution, but there are other solutions on Linux like MonadoVR. ## Interlaced, Checkerboard, and Anaglyph Installation -- Complete the [Base Installation](#base-install) section +- Complete the Base Installation section - Optionally set `tab_enable` to true in `Steam\steamapps\common\SteamVR\drivers\vrto3d\resources\settings\default.vrsettings` if you prefer to lose half vertical resolution instead of half horizontal resolution - Download the latest [ReShade](https://reshade.me/#download) with full add-on support - Run the ReShade installer @@ -82,7 +82,7 @@ Windows-only solution, but there are other solutions on Linux like MonadoVR. - Many DX12 games are not compatible with these old drivers (crashes) - Having 3DVision enabled will crash DX12 games - Make sure your game runs on old drivers with 3D disabled before attempting to get it working with VRto3D -- Complete the [Base Installation](#base-install) section +- Complete the Base Installation section - Modify the window_width and window_height in `Steam\steamapps\common\SteamVR\drivers\vrto3d\resources\settings\default.vrsettings` to match your fullscreen resolution - Download and install [SpecialK](https://sk-data.special-k.info/SpecialK.exe) - Under SteamVR Properties, set Launch Options to `SKIF %COMMAND%` diff --git a/vrto3d/src/hmd_device_driver.cpp b/vrto3d/src/hmd_device_driver.cpp index 4482620..a73d39c 100644 --- a/vrto3d/src/hmd_device_driver.cpp +++ b/vrto3d/src/hmd_device_driver.cpp @@ -259,6 +259,10 @@ vr::EVRInitError MockControllerDeviceDriver::Activate( uint32_t unObjectId ) // We need to get handles to them to update the inputs. vr::VRDriverInput()->CreateBooleanComponent( container, "/input/system/touch", &my_input_handles_[ MyComponent_system_touch ] ); vr::VRDriverInput()->CreateBooleanComponent( container, "/input/system/click", &my_input_handles_[ MyComponent_system_click ] ); + // set proximity senser to always on, always head present + vr::VRInputComponentHandle_t prox; + vr::VRDriverInput()->CreateBooleanComponent(container, "/proximity", &prox); + vr::VRDriverInput()->UpdateBooleanComponent(prox, true, 0.0); // Miscellaneous settings vrs->SetBool(vr::k_pch_DirectMode_Section, vr::k_pch_DirectMode_Enable_Bool, false); diff --git a/vrto3d/vrto3d/resources/settings/default.vrsettings b/vrto3d/vrto3d/resources/settings/default.vrsettings index 2e9c605..00f578e 100644 --- a/vrto3d/vrto3d/resources/settings/default.vrsettings +++ b/vrto3d/vrto3d/resources/settings/default.vrsettings @@ -5,7 +5,7 @@ "model_number": "Stereo3D-1" }, "vrto3d_display": { - "window_width": 1920, + "window_width": 3840, "window_height": 1080, "hmd_height": 1.0, "aspect_ratio": 1.77778, @@ -13,14 +13,14 @@ "depth": 0.5, "convergence": 0.1, "tab_enable": false, - "half_enable": true, + "half_enable": false, "reverse_enable": false, "hdr_enable": false, "depth_gauge": false, "display_latency": 0.011, "display_frequency": 60.0, - "pitch_enable": false, - "yaw_enable": false, + "pitch_enable": true, + "yaw_enable": true, "ctrl_deadzone": 0.05, "ctrl_sensitivity": 1.0, "num_user_settings": 3,