public JoystickDeviceAdapter(JoystickEventArguments args) { JoystickID = args.JoystickID; IsController = args.IsController; NumAxis = args.NumAxes; NumButtons = args.NumButtons; NumHats = args.NumHats; }
private JoystickDeviceAdapter GetOrCreateDeviceAdapter(JoystickEventArguments args) { JoystickDeviceAdapter state; if (!_joysticks.TryGetValue(args.JoystickID, out state)) { state = new JoystickDeviceAdapter(args); if (Page != null) { state.AssignPage(Page); } _joysticks.Add(args.JoystickID, state); Page?.OnJoystickConnected(this, new JoystickConnectedEventArguments(args)); } return(state); }