public void PortItemSelected(PortMappingItem item) { _currentPortMapping = item.PortMapping; _currentDevice = _deviceProxy.GetDevice(_currentPortMapping.DeviceId, _currentPortMapping.SubDeviceId); CurrentDeviceName = _currentDevice != null ? _currentDevice.DeviceName : null; CurrentPlayerHeader = item.Label(Consts.KEY_NAME, "").Evaluate(); var wm = ServiceRegistration.Get <IWorkflowManager>(); wm.NavigatePushAsync(STATE_DEVICE_CONFIGURE, new NavigationContextConfig() { NavigationContextDisplayLabel = CurrentPlayerHeader }); }
protected void InitializeControllerWrapper() { _controllerWrapper = new ControllerWrapper(_settings.MaxPlayers); DeviceProxy deviceProxy = new DeviceProxy(); List <IMappableDevice> deviceList = deviceProxy.GetDevices(false); MappingProxy mappingProxy = new MappingProxy(); foreach (PortMapping port in mappingProxy.PortMappings) { IMappableDevice device = deviceProxy.GetDevice(port.DeviceId, port.SubDeviceId, deviceList); if (device != null) { RetroPadMapping mapping = mappingProxy.GetDeviceMapping(device); device.Map(mapping); _controllerWrapper.AddController(device, port.Port); Logger.Debug("LibRetroFrontend: Mapped controller {0} to port {1}", device.DeviceName, port.Port); } } }