mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 23:03:51 +02:00
Display short url and normal one, small changes and fixes
This commit is contained in:
@@ -39,6 +39,7 @@ namespace VRCX
|
||||
private bool _active;
|
||||
private bool _hmdOverlayActive;
|
||||
private bool _wristOverlayActive;
|
||||
private bool _menuButton;
|
||||
|
||||
static VRCXVR()
|
||||
{
|
||||
@@ -245,11 +246,12 @@ namespace VRCX
|
||||
|
||||
}
|
||||
|
||||
public void SetActive(bool active, bool hmdOverlay, bool wristOverlay)
|
||||
public void SetActive(bool active, bool hmdOverlay, bool wristOverlay, bool menuButton)
|
||||
{
|
||||
_active = active;
|
||||
_hmdOverlayActive = hmdOverlay;
|
||||
_wristOverlayActive = wristOverlay;
|
||||
_menuButton = menuButton;
|
||||
}
|
||||
|
||||
public void Refresh()
|
||||
@@ -300,7 +302,6 @@ namespace VRCX
|
||||
sb.Clear();
|
||||
system.GetStringTrackedDeviceProperty(i, ETrackedDeviceProperty.Prop_TrackingSystemName_String, sb, (uint)sb.Capacity, ref err);
|
||||
var isOculus = sb.ToString().IndexOf("oculus", StringComparison.OrdinalIgnoreCase) >= 0;
|
||||
var button = "true".Equals(SharedVariable.Instance.Get("config:vrcx_overlaybutton"));
|
||||
// Oculus : B/Y, Bit 1, Mask 2
|
||||
// Oculus : A/X, Bit 7, Mask 128
|
||||
// Vive : Menu, Bit 1, Mask 2,
|
||||
@@ -310,7 +311,7 @@ namespace VRCX
|
||||
role == ETrackedControllerRole.RightHand)
|
||||
{
|
||||
if (system.GetControllerState(i, ref state, (uint)Marshal.SizeOf(state)) &&
|
||||
(state.ulButtonPressed & (button ? 2u : (isOculus ? 128u : 4u))) != 0)
|
||||
(state.ulButtonPressed & (_menuButton ? 2u : (isOculus ? 128u : 4u))) != 0)
|
||||
{
|
||||
if (role == ETrackedControllerRole.LeftHand)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user