mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 22:39:22 +00:00
[DesktopVRSwitch] Fixes for 2023r171
This commit is contained in:
parent
ba6a5f4778
commit
be82bf228c
12 changed files with 61 additions and 129 deletions
|
@ -1,4 +1,6 @@
|
|||
using ABI_RC.Core.Savior;
|
||||
using ABI_RC.Systems.InputManagement;
|
||||
using ABI_RC.Systems.InputManagement.InputModules;
|
||||
|
||||
namespace NAK.DesktopVRSwitch.VRModeTrackers;
|
||||
|
||||
|
@ -14,14 +16,17 @@ public class CVRInputManagerTracker : VRModeTracker
|
|||
VRModeSwitchManager.OnPostVRModeSwitch -= OnPostSwitch;
|
||||
}
|
||||
|
||||
void OnPostSwitch(bool intoVR)
|
||||
private void OnPostSwitch(bool intoVR)
|
||||
{
|
||||
DesktopVRSwitch.Logger.Msg("Resetting CVRInputManager inputs.");
|
||||
|
||||
CVRInputManager.Instance.inputEnabled = true;
|
||||
|
||||
// IM CRYING
|
||||
CVRInputManager.Instance.reload = true;
|
||||
|
||||
//just in case
|
||||
CVRInputManager.Instance.blockedByUi = false;
|
||||
CVRInputManager.Instance.textInputFocused = false;
|
||||
//sometimes head can get stuck, so just in case
|
||||
CVRInputManager.Instance.independentHeadToggle = false;
|
||||
//just nice to load into desktop with idle gesture
|
||||
|
@ -31,5 +36,12 @@ public class CVRInputManagerTracker : VRModeTracker
|
|||
CVRInputManager.Instance.gestureRightRaw = 0f;
|
||||
//turn off finger tracking input
|
||||
CVRInputManager.Instance.individualFingerTracking = false;
|
||||
|
||||
//add input module if you started in desktop
|
||||
if (CVRInputManager._moduleXR == null)
|
||||
CVRInputManager.Instance.AddInputModule(CVRInputManager._moduleXR = new CVRInputModule_XR());
|
||||
|
||||
//enable xr input or whatnot
|
||||
CVRInputManager._moduleXR.InputEnabled = intoVR;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue