@@ -1523,7 +1523,7 @@ public void Devices_CanReconnectDevice_WhenDisconnectedWhileAppIsOutOfFocus()
15231523 Assert . That ( device , Is . Not . Null ) ;
15241524
15251525 // Loose focus.
1526- ScheduleFocusEvent ( false ) ;
1526+ ScheduleFocusChangedEvent ( applicationHasFocus : false ) ;
15271527 InputSystem . Update ( ) ;
15281528
15291529 // Disconnect.
@@ -1535,7 +1535,7 @@ public void Devices_CanReconnectDevice_WhenDisconnectedWhileAppIsOutOfFocus()
15351535 Assert . That ( InputSystem . devices , Is . Empty ) ;
15361536
15371537 // Regain focus.
1538- ScheduleFocusEvent ( true ) ;
1538+ ScheduleFocusChangedEvent ( applicationHasFocus : true ) ;
15391539 InputSystem . Update ( ) ;
15401540
15411541 var newDeviceId = runtime . ReportNewInputDevice ( deviceDesc ) ;
@@ -4654,7 +4654,7 @@ void DeviceChangeCallback(InputDevice device, InputDeviceChange change)
46544654 }
46554655
46564656 // Lose focus.
4657- ScheduleFocusEvent ( false ) ;
4657+ ScheduleFocusChangedEvent ( applicationHasFocus : false ) ;
46584658 InputSystem . Update ( InputUpdateType . Dynamic ) ;
46594659
46604660 Assert . That ( sensor . enabled , Is . False ) ;
@@ -5076,7 +5076,7 @@ void DeviceChangeCallback(InputDevice device, InputDeviceChange change)
50765076 commands . Clear ( ) ;
50775077
50785078 // Regain focus.
5079- ScheduleFocusEvent ( true ) ;
5079+ ScheduleFocusChangedEvent ( applicationHasFocus : true ) ;
50805080 InputSystem . Update ( InputUpdateType . Dynamic ) ;
50815081
50825082 Assert . That ( sensor . enabled , Is . False ) ;
@@ -5324,7 +5324,7 @@ public void Devices_CanSkipProcessingEventsWhileInBackground()
53245324 Assert . That ( performedCount , Is . EqualTo ( 1 ) ) ;
53255325
53265326 // Lose focus
5327- ScheduleFocusEvent ( false ) ;
5327+ ScheduleFocusChangedEvent ( applicationHasFocus : false ) ;
53285328#if UNITY_INPUTSYSTEM_SUPPORTS_FOCUS_EVENTS
53295329 // in the new system, we have to process the focus event to update the state of the devices.
53305330 // In the old system, this wouldn't work and would make the test fal
@@ -5341,7 +5341,7 @@ public void Devices_CanSkipProcessingEventsWhileInBackground()
53415341 InputSystem . Update ( ) ;
53425342
53435343 // Gain focus
5344- ScheduleFocusEvent ( true ) ;
5344+ ScheduleFocusChangedEvent ( applicationHasFocus : true ) ;
53455345
53465346 // Run update to try process events accordingly once focus is gained
53475347 InputSystem . Update ( ) ;
0 commit comments