Skip to content

Commit f5500dc

Browse files
Add formatting!
1 parent 1edbc32 commit f5500dc

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

Packages/com.unity.inputsystem/InputSystem/Runtime/Actions/InputActionState.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4496,13 +4496,13 @@ internal struct GlobalState
44964496
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
44974497
private static void InitializeGlobalActionState()
44984498
{
4499-
#if UNITY_EDITOR
4499+
#if UNITY_EDITOR
45004500
// Appears we shouldn't really reset globals in case the domain reload is enabled.
45014501
// This is because in that case, we've just had the whole system init'ed via static ctors
45024502
// Moreover, later in GlobalInialize we skip initialization specifically in this case.
45034503
if (!(InputSystem.s_IsDomainReloadDisabled?.Invoke() ?? false))
45044504
return;
4505-
#endif
4505+
#endif
45064506

45074507
ResetGlobals();
45084508
s_GlobalState = default;

Packages/com.unity.inputsystem/InputSystem/Runtime/Controls/InputControlExtensions.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,8 @@ public static bool HasButtonPress(this InputEventPtr eventPtr, float magnitude =
11341134
/// in the devices state memory. For example, in the gamepad state, button north (bit position 4) will be evaluated before button
11351135
/// east (bit position 5), so if both buttons were pressed in the given event, button north would be returned.
11361136
/// Note that the function returns null if the <paramref name="eventPtr"/> is not a StateEvent or DeltaStateEvent.</remarks>
1137-
public static unsafe InputControl GetFirstButtonPressOrNull(this InputEventPtr eventPtr, float magnitude = -1, bool buttonControlsOnly = true)
1137+
public static unsafe InputControl GetFirstButtonPressOrNull(this InputEventPtr eventPtr, float magnitude = -1,
1138+
bool buttonControlsOnly = true)
11381139
{
11391140
if (eventPtr.type != StateEvent.Type && eventPtr.type != DeltaStateEvent.Type)
11401141
return null;
@@ -1150,8 +1151,9 @@ public static unsafe InputControl GetFirstButtonPressOrNull(this InputEventPtr e
11501151
// default (not pressed) before this event.
11511152
var stateInEvent = control.GetStatePtrFromStateEvent(eventPtr);
11521153
var currentState = control.currentStatePtr;
1153-
if (stateInEvent != null ? !control.CompareValue(currentState, stateInEvent)
1154-
: control.CompareValue(currentState, control.defaultStatePtr))
1154+
if (stateInEvent != null
1155+
? !control.CompareValue(currentState, stateInEvent)
1156+
: control.CompareValue(currentState, control.defaultStatePtr))
11551157
continue;
11561158
if (buttonControlsOnly && !control.isButton)
11571159
continue;

0 commit comments

Comments
 (0)