Skip to content

Commit 67f6c04

Browse files
committed
Removed InputManager.focusState property since only the setter was used
- Replaced the one line where the setter was used with directly updating the runtime's focus state. This was done to remove questions about the fallback case for the getter if there was no runtime set.
1 parent daafb57 commit 67f6c04

1 file changed

Lines changed: 1 addition & 18 deletions

File tree

Packages/com.unity.inputsystem/InputSystem/Runtime/InputManager.cs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -264,22 +264,6 @@ public InputSettings.ScrollDeltaBehavior scrollDeltaBehavior
264264
}
265265
}
266266

267-
public FocusFlags focusState
268-
{
269-
get
270-
{
271-
if (m_Runtime != null)
272-
return m_Runtime.focusState;
273-
274-
return Application.isFocused ? FocusFlags.ApplicationFocus : FocusFlags.None;
275-
}
276-
set
277-
{
278-
if (m_Runtime != null)
279-
m_Runtime.focusState = value;
280-
}
281-
}
282-
283267
public float pollingFrequency
284268
{
285269
get
@@ -3925,8 +3909,7 @@ private void ProcessDeviceConfigurationEvent(InputDevice device)
39253909
private unsafe void ProcessFocusEvent(InputEvent* currentEventReadPtr)
39263910
{
39273911
var focusEventPtr = (InputFocusEvent*)currentEventReadPtr;
3928-
FocusFlags state = focusEventPtr->focusFlags;
3929-
focusState = state;
3912+
m_Runtime.focusState = focusEventPtr->focusFlags;
39303913

39313914
#if UNITY_EDITOR
39323915
SyncAllDevicesWhenEditorIsActivated();

0 commit comments

Comments
 (0)