Skip to content

Commit aec3bee

Browse files
committed
Removed accidental Ignore and made test reflect old behaviour.
1 parent 8eb2ec3 commit aec3bee

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

Assets/Tests/InputSystem/CoreTests_Events.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,11 +1236,18 @@ public void Events_HandledFlagIsResetWhenEventIsQueued()
12361236
Assert.That(wasHandled, Is.False);
12371237
}
12381238

1239-
[Ignore("ISXB-1097: SuppressStateUpdates desynchronizes Input System state from source state")]
1239+
// ISXB-1097: This test verifies the deprecated SuppressStateUpdates behavior where handled
1240+
// events are discarded entirely, preventing device state from updating. This policy is
1241+
// deprecated because it desynchronizes the Input System's state from the source, but the
1242+
// behavior is preserved for backward compatibility when explicitly opted in.
12401243
[Test]
12411244
[Category("Events")]
12421245
public void Events_CanPreventEventsFromBeingProcessed()
12431246
{
1247+
#pragma warning disable CS0618 // Type or member is obsolete
1248+
InputSystem.manager.inputEventHandledPolicy = InputEventHandledPolicy.SuppressStateUpdates;
1249+
#pragma warning restore CS0618 // Type or member is obsolete
1250+
12441251
InputSystem.onEvent +=
12451252
(inputEvent, _) =>
12461253
{
@@ -1466,7 +1473,7 @@ public void Events_HandledEventsShouldNotTriggerActionsWhenSwitchingDevices()
14661473
action.Enable();
14671474

14681475
var performedCount = 0;
1469-
action.performed += _ => ++performedCount;
1476+
action.performed += _ => ++ performedCount;
14701477

14711478
// Suppress all events via onEvent listener (user scenario from the bug report).
14721479
InputSystem.onEvent += (eventPtr, _) => { eventPtr.handled = true; };
@@ -1511,7 +1518,7 @@ public void Events_HandledPressEdgeInMultiEventFrameShouldNotTriggerActions()
15111518
action.Enable();
15121519

15131520
var performedCount = 0;
1514-
action.performed += _ => ++performedCount;
1521+
action.performed += _ => ++ performedCount;
15151522

15161523
// Mark only the first event in each update as handled (simulating selective suppression
15171524
// of the press-edge event while allowing subsequent state updates through).

0 commit comments

Comments
 (0)