|
@@ -186,7 +186,7 @@ public static class OVRInput
|
|
|
if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
|
|
|
{
|
|
|
OVRInput.RawButton rawButton = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
|
|
|
- if ((ovrcontrollerBase.currentState.Buttons & (uint)rawButton) != 0u)
|
|
|
+ if ((ovrcontrollerBase.currentState.Buttons & (uint)rawButton) != 0U)
|
|
|
{
|
|
|
return true;
|
|
|
}
|
|
@@ -218,11 +218,11 @@ public static class OVRInput
|
|
|
if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
|
|
|
{
|
|
|
OVRInput.RawButton rawButton = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
|
|
|
- if ((ovrcontrollerBase.previousState.Buttons & (uint)rawButton) != 0u)
|
|
|
+ if ((ovrcontrollerBase.previousState.Buttons & (uint)rawButton) != 0U)
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
- if ((ovrcontrollerBase.currentState.Buttons & (uint)rawButton) != 0u && (ovrcontrollerBase.previousState.Buttons & (uint)rawButton) == 0u)
|
|
|
+ if ((ovrcontrollerBase.currentState.Buttons & (uint)rawButton) != 0U && (ovrcontrollerBase.previousState.Buttons & (uint)rawButton) == 0U)
|
|
|
{
|
|
|
result = true;
|
|
|
}
|
|
@@ -254,11 +254,11 @@ public static class OVRInput
|
|
|
if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
|
|
|
{
|
|
|
OVRInput.RawButton rawButton = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
|
|
|
- if ((ovrcontrollerBase.currentState.Buttons & (uint)rawButton) != 0u)
|
|
|
+ if ((ovrcontrollerBase.currentState.Buttons & (uint)rawButton) != 0U)
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
- if ((ovrcontrollerBase.currentState.Buttons & (uint)rawButton) == 0u && (ovrcontrollerBase.previousState.Buttons & (uint)rawButton) != 0u)
|
|
|
+ if ((ovrcontrollerBase.currentState.Buttons & (uint)rawButton) == 0U && (ovrcontrollerBase.previousState.Buttons & (uint)rawButton) != 0U)
|
|
|
{
|
|
|
result = true;
|
|
|
}
|
|
@@ -289,7 +289,7 @@ public static class OVRInput
|
|
|
if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
|
|
|
{
|
|
|
OVRInput.RawTouch rawTouch = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
|
|
|
- if ((ovrcontrollerBase.currentState.Touches & (uint)rawTouch) != 0u)
|
|
|
+ if ((ovrcontrollerBase.currentState.Touches & (uint)rawTouch) != 0U)
|
|
|
{
|
|
|
return true;
|
|
|
}
|
|
@@ -321,11 +321,11 @@ public static class OVRInput
|
|
|
if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
|
|
|
{
|
|
|
OVRInput.RawTouch rawTouch = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
|
|
|
- if ((ovrcontrollerBase.previousState.Touches & (uint)rawTouch) != 0u)
|
|
|
+ if ((ovrcontrollerBase.previousState.Touches & (uint)rawTouch) != 0U)
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
- if ((ovrcontrollerBase.currentState.Touches & (uint)rawTouch) != 0u && (ovrcontrollerBase.previousState.Touches & (uint)rawTouch) == 0u)
|
|
|
+ if ((ovrcontrollerBase.currentState.Touches & (uint)rawTouch) != 0U && (ovrcontrollerBase.previousState.Touches & (uint)rawTouch) == 0U)
|
|
|
{
|
|
|
result = true;
|
|
|
}
|
|
@@ -357,11 +357,11 @@ public static class OVRInput
|
|
|
if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
|
|
|
{
|
|
|
OVRInput.RawTouch rawTouch = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
|
|
|
- if ((ovrcontrollerBase.currentState.Touches & (uint)rawTouch) != 0u)
|
|
|
+ if ((ovrcontrollerBase.currentState.Touches & (uint)rawTouch) != 0U)
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
- if ((ovrcontrollerBase.currentState.Touches & (uint)rawTouch) == 0u && (ovrcontrollerBase.previousState.Touches & (uint)rawTouch) != 0u)
|
|
|
+ if ((ovrcontrollerBase.currentState.Touches & (uint)rawTouch) == 0U && (ovrcontrollerBase.previousState.Touches & (uint)rawTouch) != 0U)
|
|
|
{
|
|
|
result = true;
|
|
|
}
|
|
@@ -392,7 +392,7 @@ public static class OVRInput
|
|
|
if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
|
|
|
{
|
|
|
OVRInput.RawNearTouch rawNearTouch = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
|
|
|
- if ((ovrcontrollerBase.currentState.NearTouches & (uint)rawNearTouch) != 0u)
|
|
|
+ if ((ovrcontrollerBase.currentState.NearTouches & (uint)rawNearTouch) != 0U)
|
|
|
{
|
|
|
return true;
|
|
|
}
|
|
@@ -424,11 +424,11 @@ public static class OVRInput
|
|
|
if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
|
|
|
{
|
|
|
OVRInput.RawNearTouch rawNearTouch = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
|
|
|
- if ((ovrcontrollerBase.previousState.NearTouches & (uint)rawNearTouch) != 0u)
|
|
|
+ if ((ovrcontrollerBase.previousState.NearTouches & (uint)rawNearTouch) != 0U)
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
- if ((ovrcontrollerBase.currentState.NearTouches & (uint)rawNearTouch) != 0u && (ovrcontrollerBase.previousState.NearTouches & (uint)rawNearTouch) == 0u)
|
|
|
+ if ((ovrcontrollerBase.currentState.NearTouches & (uint)rawNearTouch) != 0U && (ovrcontrollerBase.previousState.NearTouches & (uint)rawNearTouch) == 0U)
|
|
|
{
|
|
|
result = true;
|
|
|
}
|
|
@@ -460,11 +460,11 @@ public static class OVRInput
|
|
|
if (OVRInput.ShouldResolveController(ovrcontrollerBase.controllerType, controllerMask))
|
|
|
{
|
|
|
OVRInput.RawNearTouch rawNearTouch = rawMask | ovrcontrollerBase.ResolveToRawMask(virtualMask);
|
|
|
- if ((ovrcontrollerBase.currentState.NearTouches & (uint)rawNearTouch) != 0u)
|
|
|
+ if ((ovrcontrollerBase.currentState.NearTouches & (uint)rawNearTouch) != 0U)
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
- if ((ovrcontrollerBase.currentState.NearTouches & (uint)rawNearTouch) == 0u && (ovrcontrollerBase.previousState.NearTouches & (uint)rawNearTouch) != 0u)
|
|
|
+ if ((ovrcontrollerBase.currentState.NearTouches & (uint)rawNearTouch) == 0U && (ovrcontrollerBase.previousState.NearTouches & (uint)rawNearTouch) != 0U)
|
|
|
{
|
|
|
result = true;
|
|
|
}
|
|
@@ -862,51 +862,51 @@ public static class OVRInput
|
|
|
OVRPlugin.ControllerState controllerState = OVRPlugin.GetControllerState((uint)this.controllerType);
|
|
|
if (controllerState.LIndexTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- controllerState.Buttons |= 268435456u;
|
|
|
+ controllerState.Buttons |= 268435456U;
|
|
|
}
|
|
|
if (controllerState.LHandTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- controllerState.Buttons |= 536870912u;
|
|
|
+ controllerState.Buttons |= 536870912U;
|
|
|
}
|
|
|
if (controllerState.LThumbstick.y >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- controllerState.Buttons |= 16u;
|
|
|
+ controllerState.Buttons |= 16U;
|
|
|
}
|
|
|
if (controllerState.LThumbstick.y <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- controllerState.Buttons |= 32u;
|
|
|
+ controllerState.Buttons |= 32U;
|
|
|
}
|
|
|
if (controllerState.LThumbstick.x <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- controllerState.Buttons |= 64u;
|
|
|
+ controllerState.Buttons |= 64U;
|
|
|
}
|
|
|
if (controllerState.LThumbstick.x >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- controllerState.Buttons |= 128u;
|
|
|
+ controllerState.Buttons |= 128U;
|
|
|
}
|
|
|
if (controllerState.RIndexTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- controllerState.Buttons |= 67108864u;
|
|
|
+ controllerState.Buttons |= 67108864U;
|
|
|
}
|
|
|
if (controllerState.RHandTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- controllerState.Buttons |= 134217728u;
|
|
|
+ controllerState.Buttons |= 134217728U;
|
|
|
}
|
|
|
if (controllerState.RThumbstick.y >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- controllerState.Buttons |= 4096u;
|
|
|
+ controllerState.Buttons |= 4096U;
|
|
|
}
|
|
|
if (controllerState.RThumbstick.y <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- controllerState.Buttons |= 8192u;
|
|
|
+ controllerState.Buttons |= 8192U;
|
|
|
}
|
|
|
if (controllerState.RThumbstick.x <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- controllerState.Buttons |= 16384u;
|
|
|
+ controllerState.Buttons |= 16384U;
|
|
|
}
|
|
|
if (controllerState.RThumbstick.x >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- controllerState.Buttons |= 32768u;
|
|
|
+ controllerState.Buttons |= 32768U;
|
|
|
}
|
|
|
this.previousState = this.currentState;
|
|
|
this.currentState = controllerState;
|
|
@@ -1786,63 +1786,63 @@ public static class OVRInput
|
|
|
bool flag = OVRInput.OVRControllerGamepadMac.OVR_GamepadController_Update();
|
|
|
if (flag)
|
|
|
{
|
|
|
- currentState.ConnectedControllers = 16u;
|
|
|
+ currentState.ConnectedControllers = 16U;
|
|
|
}
|
|
|
if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(0))
|
|
|
{
|
|
|
- currentState.Buttons |= 1u;
|
|
|
+ currentState.Buttons |= 1U;
|
|
|
}
|
|
|
if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(1))
|
|
|
{
|
|
|
- currentState.Buttons |= 2u;
|
|
|
+ currentState.Buttons |= 2U;
|
|
|
}
|
|
|
if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(2))
|
|
|
{
|
|
|
- currentState.Buttons |= 256u;
|
|
|
+ currentState.Buttons |= 256U;
|
|
|
}
|
|
|
if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(3))
|
|
|
{
|
|
|
- currentState.Buttons |= 512u;
|
|
|
+ currentState.Buttons |= 512U;
|
|
|
}
|
|
|
if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(4))
|
|
|
{
|
|
|
- currentState.Buttons |= 65536u;
|
|
|
+ currentState.Buttons |= 65536U;
|
|
|
}
|
|
|
if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(5))
|
|
|
{
|
|
|
- currentState.Buttons |= 131072u;
|
|
|
+ currentState.Buttons |= 131072U;
|
|
|
}
|
|
|
if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(6))
|
|
|
{
|
|
|
- currentState.Buttons |= 262144u;
|
|
|
+ currentState.Buttons |= 262144U;
|
|
|
}
|
|
|
if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(7))
|
|
|
{
|
|
|
- currentState.Buttons |= 524288u;
|
|
|
+ currentState.Buttons |= 524288U;
|
|
|
}
|
|
|
if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(8))
|
|
|
{
|
|
|
- currentState.Buttons |= 1048576u;
|
|
|
+ currentState.Buttons |= 1048576U;
|
|
|
}
|
|
|
if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(9))
|
|
|
{
|
|
|
- currentState.Buttons |= 2097152u;
|
|
|
+ currentState.Buttons |= 2097152U;
|
|
|
}
|
|
|
if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(10))
|
|
|
{
|
|
|
- currentState.Buttons |= 1024u;
|
|
|
+ currentState.Buttons |= 1024U;
|
|
|
}
|
|
|
if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(11))
|
|
|
{
|
|
|
- currentState.Buttons |= 4u;
|
|
|
+ currentState.Buttons |= 4U;
|
|
|
}
|
|
|
if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(12))
|
|
|
{
|
|
|
- currentState.Buttons |= 2048u;
|
|
|
+ currentState.Buttons |= 2048U;
|
|
|
}
|
|
|
if (OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetButton(13))
|
|
|
{
|
|
|
- currentState.Buttons |= 8u;
|
|
|
+ currentState.Buttons |= 8U;
|
|
|
}
|
|
|
currentState.LThumbstick.x = OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetAxis(0);
|
|
|
currentState.LThumbstick.y = OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetAxis(1);
|
|
@@ -1852,51 +1852,51 @@ public static class OVRInput
|
|
|
currentState.RIndexTrigger = OVRInput.OVRControllerGamepadMac.OVR_GamepadController_GetAxis(5);
|
|
|
if (currentState.LIndexTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 268435456u;
|
|
|
+ currentState.Buttons |= 268435456U;
|
|
|
}
|
|
|
if (currentState.LHandTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 536870912u;
|
|
|
+ currentState.Buttons |= 536870912U;
|
|
|
}
|
|
|
if (currentState.LThumbstick.y >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 16u;
|
|
|
+ currentState.Buttons |= 16U;
|
|
|
}
|
|
|
if (currentState.LThumbstick.y <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 32u;
|
|
|
+ currentState.Buttons |= 32U;
|
|
|
}
|
|
|
if (currentState.LThumbstick.x <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 64u;
|
|
|
+ currentState.Buttons |= 64U;
|
|
|
}
|
|
|
if (currentState.LThumbstick.x >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 128u;
|
|
|
+ currentState.Buttons |= 128U;
|
|
|
}
|
|
|
if (currentState.RIndexTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 67108864u;
|
|
|
+ currentState.Buttons |= 67108864U;
|
|
|
}
|
|
|
if (currentState.RHandTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 134217728u;
|
|
|
+ currentState.Buttons |= 134217728U;
|
|
|
}
|
|
|
if (currentState.RThumbstick.y >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 4096u;
|
|
|
+ currentState.Buttons |= 4096U;
|
|
|
}
|
|
|
if (currentState.RThumbstick.y <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 8192u;
|
|
|
+ currentState.Buttons |= 8192U;
|
|
|
}
|
|
|
if (currentState.RThumbstick.x <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 16384u;
|
|
|
+ currentState.Buttons |= 16384U;
|
|
|
}
|
|
|
if (currentState.RThumbstick.x >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 32768u;
|
|
|
+ currentState.Buttons |= 32768U;
|
|
|
}
|
|
|
this.previousState = this.currentState;
|
|
|
this.currentState = currentState;
|
|
@@ -2075,46 +2075,46 @@ public static class OVRInput
|
|
|
return OVRInput.Controller.None;
|
|
|
}
|
|
|
OVRPlugin.ControllerState currentState = default(OVRPlugin.ControllerState);
|
|
|
- currentState.ConnectedControllers = 16u;
|
|
|
+ currentState.ConnectedControllers = 16U;
|
|
|
if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.A))
|
|
|
{
|
|
|
- currentState.Buttons |= 1u;
|
|
|
+ currentState.Buttons |= 1U;
|
|
|
}
|
|
|
if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.B))
|
|
|
{
|
|
|
- currentState.Buttons |= 2u;
|
|
|
+ currentState.Buttons |= 2U;
|
|
|
}
|
|
|
if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.X))
|
|
|
{
|
|
|
- currentState.Buttons |= 256u;
|
|
|
+ currentState.Buttons |= 256U;
|
|
|
}
|
|
|
if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.Y))
|
|
|
{
|
|
|
- currentState.Buttons |= 512u;
|
|
|
+ currentState.Buttons |= 512U;
|
|
|
}
|
|
|
if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.Start))
|
|
|
{
|
|
|
- currentState.Buttons |= 1048576u;
|
|
|
+ currentState.Buttons |= 1048576U;
|
|
|
}
|
|
|
if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.Back) || Input.GetKey(KeyCode.Escape))
|
|
|
{
|
|
|
- currentState.Buttons |= 2097152u;
|
|
|
+ currentState.Buttons |= 2097152U;
|
|
|
}
|
|
|
if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.LThumbstick))
|
|
|
{
|
|
|
- currentState.Buttons |= 1024u;
|
|
|
+ currentState.Buttons |= 1024U;
|
|
|
}
|
|
|
if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.RThumbstick))
|
|
|
{
|
|
|
- currentState.Buttons |= 4u;
|
|
|
+ currentState.Buttons |= 4U;
|
|
|
}
|
|
|
if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.LShoulder))
|
|
|
{
|
|
|
- currentState.Buttons |= 2048u;
|
|
|
+ currentState.Buttons |= 2048U;
|
|
|
}
|
|
|
if (Input.GetKey(OVRInput.OVRControllerGamepadAndroid.AndroidButtonNames.RShoulder))
|
|
|
{
|
|
|
- currentState.Buttons |= 8u;
|
|
|
+ currentState.Buttons |= 8U;
|
|
|
}
|
|
|
currentState.LThumbstick.x = Input.GetAxisRaw(OVRInput.OVRControllerGamepadAndroid.AndroidAxisNames.LThumbstickX);
|
|
|
currentState.LThumbstick.y = Input.GetAxisRaw(OVRInput.OVRControllerGamepadAndroid.AndroidAxisNames.LThumbstickY);
|
|
@@ -2124,69 +2124,69 @@ public static class OVRInput
|
|
|
currentState.RIndexTrigger = Input.GetAxisRaw(OVRInput.OVRControllerGamepadAndroid.AndroidAxisNames.RIndexTrigger);
|
|
|
if (currentState.LIndexTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 268435456u;
|
|
|
+ currentState.Buttons |= 268435456U;
|
|
|
}
|
|
|
if (currentState.LHandTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 536870912u;
|
|
|
+ currentState.Buttons |= 536870912U;
|
|
|
}
|
|
|
if (currentState.LThumbstick.y >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 16u;
|
|
|
+ currentState.Buttons |= 16U;
|
|
|
}
|
|
|
if (currentState.LThumbstick.y <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 32u;
|
|
|
+ currentState.Buttons |= 32U;
|
|
|
}
|
|
|
if (currentState.LThumbstick.x <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 64u;
|
|
|
+ currentState.Buttons |= 64U;
|
|
|
}
|
|
|
if (currentState.LThumbstick.x >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 128u;
|
|
|
+ currentState.Buttons |= 128U;
|
|
|
}
|
|
|
if (currentState.RIndexTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 67108864u;
|
|
|
+ currentState.Buttons |= 67108864U;
|
|
|
}
|
|
|
if (currentState.RHandTrigger >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 134217728u;
|
|
|
+ currentState.Buttons |= 134217728U;
|
|
|
}
|
|
|
if (currentState.RThumbstick.y >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 4096u;
|
|
|
+ currentState.Buttons |= 4096U;
|
|
|
}
|
|
|
if (currentState.RThumbstick.y <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 8192u;
|
|
|
+ currentState.Buttons |= 8192U;
|
|
|
}
|
|
|
if (currentState.RThumbstick.x <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 16384u;
|
|
|
+ currentState.Buttons |= 16384U;
|
|
|
}
|
|
|
if (currentState.RThumbstick.x >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 32768u;
|
|
|
+ currentState.Buttons |= 32768U;
|
|
|
}
|
|
|
float axisRaw = Input.GetAxisRaw(OVRInput.OVRControllerGamepadAndroid.AndroidAxisNames.DpadX);
|
|
|
float axisRaw2 = Input.GetAxisRaw(OVRInput.OVRControllerGamepadAndroid.AndroidAxisNames.DpadY);
|
|
|
if (axisRaw <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 262144u;
|
|
|
+ currentState.Buttons |= 262144U;
|
|
|
}
|
|
|
if (axisRaw >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 524288u;
|
|
|
+ currentState.Buttons |= 524288U;
|
|
|
}
|
|
|
if (axisRaw2 <= -OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 131072u;
|
|
|
+ currentState.Buttons |= 131072U;
|
|
|
}
|
|
|
if (axisRaw2 >= OVRInput.AXIS_AS_BUTTON_THRESHOLD)
|
|
|
{
|
|
|
- currentState.Buttons |= 65536u;
|
|
|
+ currentState.Buttons |= 65536U;
|
|
|
}
|
|
|
this.previousState = this.currentState;
|
|
|
this.currentState = currentState;
|
|
@@ -2333,7 +2333,7 @@ public static class OVRInput
|
|
|
OVRPlugin.ControllerState currentState = default(OVRPlugin.ControllerState);
|
|
|
if (Input.mousePresent)
|
|
|
{
|
|
|
- currentState.ConnectedControllers = 134217728u;
|
|
|
+ currentState.ConnectedControllers = 134217728U;
|
|
|
}
|
|
|
if (Input.GetMouseButtonDown(0))
|
|
|
{
|
|
@@ -2345,7 +2345,7 @@ public static class OVRInput
|
|
|
Vector3 vector = this.moveAmountMouse;
|
|
|
if (vector.magnitude < this.minMovMagnitudeMouse)
|
|
|
{
|
|
|
- currentState.Buttons |= 1u;
|
|
|
+ currentState.Buttons |= 1U;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -2354,26 +2354,26 @@ public static class OVRInput
|
|
|
{
|
|
|
if (vector.x > 0f)
|
|
|
{
|
|
|
- currentState.Buttons |= 524288u;
|
|
|
+ currentState.Buttons |= 524288U;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- currentState.Buttons |= 262144u;
|
|
|
+ currentState.Buttons |= 262144U;
|
|
|
}
|
|
|
}
|
|
|
else if (vector.y > 0f)
|
|
|
{
|
|
|
- currentState.Buttons |= 131072u;
|
|
|
+ currentState.Buttons |= 131072U;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- currentState.Buttons |= 65536u;
|
|
|
+ currentState.Buttons |= 65536U;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (Input.GetKey(KeyCode.Escape))
|
|
|
{
|
|
|
- currentState.Buttons |= 2u;
|
|
|
+ currentState.Buttons |= 2U;
|
|
|
}
|
|
|
this.previousState = this.currentState;
|
|
|
this.currentState = currentState;
|