diff --git a/src/Input/Silk.NET.Input.Glfw/GlfwGamepad.cs b/src/Input/Silk.NET.Input.Glfw/GlfwGamepad.cs index bd602be75f..6beb046fbe 100644 --- a/src/Input/Silk.NET.Input.Glfw/GlfwGamepad.cs +++ b/src/Input/Silk.NET.Input.Glfw/GlfwGamepad.cs @@ -23,7 +23,7 @@ public GlfwGamepad(int i) Thumbsticks = new Thumbstick[GamepadThumbstickCount]; Triggers = new Trigger[GamepadTriggerCount]; - _connected = hasState; + IsConnected = _connected = hasState; for (int j = 0; j < GamepadButtonCount; j++) { @@ -44,7 +44,12 @@ public GlfwGamepad(int i) public string Name => GlfwProvider.GLFW.Value.GetGamepadName(Index) ?? "Silk.NET Gamepad (via GLFW)"; public int Index { get; } - public bool IsConnected => GlfwProvider.GLFW.Value.JoystickIsGamepad(Index); + + /// + /// Cached connection status from GLFW's joystick connection callback. + /// + public bool IsConnected { get; internal set; } + public IReadOnlyList