Created
June 9, 2022 12:50
-
-
Save MartinZikmund/fff5c224d2f34e3b219a63606095392b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gamepad.GamepadAdded += GamepadAdded; | |
Gamepad.GamepadRemoved += GamepadRemoved; | |
private void GamepadAdded(object sender, Gamepad gamepad) | |
{ | |
Debug.WriteLine("A gamepad was connected"); | |
} | |
private void GamepadRemoved(object sender, Gamepad gamepad) | |
{ | |
Debug.WriteLine("A gamepad was disconnected"); | |
} | |
// Get all currently connected gamepads | |
var gamepads = Gamepad.Gamepads; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment