void device_ExtensionChange(object sender, NintrollerExtensionEventArgs e) { DeviceType = e.controllerType; if (holder != null) { holder.AddMapping(DeviceType); } Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Background, new Action(() => UpdateIcon(DeviceType) )); }
void device_ExtensionChange(object sender, NintrollerExtensionEventArgs e) { this.device.IsControllerTypeAmbiguous = false; if (holder != null) { holder.AddMapping(e.controllerType); } this.DeviceType = e.controllerType; Application.Current.Dispatcher.BeginInvoke( DispatcherPriority.Background, new Action(() => { UpdateIcon(DeviceType); this.SetNameIfNotConfigured(this.DeviceType.ToString()); }) ); }
void device_ExtensionChange(object sender, NintrollerExtensionEventArgs e) { DeviceType = e.controllerType; if (holder != null) { holder.AddMapping(DeviceType); } Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Background, new Action(() => { UpdateIcon(DeviceType); int playerNum = targetXDevice; Detatch(); AssignToXinputPlayer(playerNum); UpdateIcon(DeviceType); } )); }