Skip to content

Commit

Permalink
Updated for latest trunk PR changes (5f81a20).
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitalain committed May 30, 2024
1 parent 680d8c8 commit 8ecdb01
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ internal unsafe interface IInputRuntime

Vector2 screenSize { get; }
ScreenOrientation screenOrientation { get; }
bool allowPlatformSpecificInputForScrollWheelDelta { get; set; }
bool normalizeScrollWheelDelta { get; set; }
float scrollWheelDeltaPerTick { get; }

// If analytics are enabled, the runtime receives analytics events from the input manager.
Expand Down
4 changes: 2 additions & 2 deletions Packages/com.unity.inputsystem/InputSystem/InputManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ public InputSettings.ScrollDeltaBehavior scrollDeltaBehavior

m_ScrollDeltaBehavior = value;

InputRuntime.s_Instance.allowPlatformSpecificInputForScrollWheelDelta =
m_ScrollDeltaBehavior == InputSettings.ScrollDeltaBehavior.KeepPlatformSpecificInputRange;
InputRuntime.s_Instance.normalizeScrollWheelDelta =
m_ScrollDeltaBehavior == InputSettings.ScrollDeltaBehavior.UniformAcrossAllPlatforms;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,11 @@ private void OnFocusChanged(bool focus)
public Vector2 screenSize => new Vector2(Screen.width, Screen.height);
public ScreenOrientation screenOrientation => Screen.orientation;

public bool allowPlatformSpecificInputForScrollWheelDelta
public bool normalizeScrollWheelDelta
{
#if UNITY_6000_0_OR_NEWER
get => NativeInputSystem.allowPlatformSpecificInputForScrollWheelDelta;
set => NativeInputSystem.allowPlatformSpecificInputForScrollWheelDelta = value;
get => NativeInputSystem.normalizeScrollWheelDelta;
set => NativeInputSystem.normalizeScrollWheelDelta = value;
#else
get; set;
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ public struct PairedUser

public Vector2 screenSize { get; set; } = new Vector2(1024, 768);
public ScreenOrientation screenOrientation { set; get; } = ScreenOrientation.Portrait;
public bool allowPlatformSpecificInputForScrollWheelDelta { get; set; }
public bool normalizeScrollWheelDelta { get; set; } = true;
public float scrollWheelDeltaPerTick { get; } = 1.0f;

public List<PairedUser> userAccountPairings
Expand Down

0 comments on commit 8ecdb01

Please sign in to comment.