internal static void AddDevice(int deviceId) { var jdevice = Sdl.Joystick.Open(deviceId); var id = 0; while (Joysticks.ContainsKey(id)) { id++; } Joysticks.Add(id, jdevice); if (Sdl.GameController.IsGameController(deviceId) == 1) { GamePad.AddDevice(deviceId); } }