Browse Source

macosx: Fix misbehaving audio device popups

Prevents changing selection automatically, note that the audioChanged
selector is used multiple times.

refs #20766
pull/73/head
David Fuhrmann 8 years ago
parent
commit
558c52cf5c
  1. 16
      modules/gui/macosx/VLCOpenWindowController.m

16
modules/gui/macosx/VLCOpenWindowController.m

@ -1197,19 +1197,19 @@ static NSString *kCaptureTabViewId = @"capture";
- (IBAction)qtkChanged:(id)sender - (IBAction)qtkChanged:(id)sender
{ {
NSInteger selectedDevice = [_qtkVideoDevicePopup indexOfSelectedItem]; NSInteger selectedDevice = [_qtkVideoDevicePopup indexOfSelectedItem];
if (_avvideoDevices.count >= 1) { if (selectedDevice >= _avvideoDevices.count)
_avCurrentDeviceUID = [[(AVCaptureDevice *)[_avvideoDevices objectAtIndex:selectedDevice] uniqueID] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; return;
}
_avCurrentDeviceUID = [[(AVCaptureDevice *)[_avvideoDevices objectAtIndex:selectedDevice] uniqueID] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
} }
- (IBAction)qtkAudioChanged:(id)sender - (IBAction)qtkAudioChanged:(id)sender
{ {
NSInteger selectedDevice = [_qtkAudioDevicePopup indexOfSelectedItem]; NSInteger selectedDevice = [_qtkAudioDevicePopup indexOfSelectedItem];
if (_avaudioDevices.count >= 1) { if (selectedDevice >= _avaudioDevices.count)
_avCurrentAudioDeviceUID = [[(AVCaptureDevice *)[_avaudioDevices objectAtIndex:selectedDevice] uniqueID] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; return;
}
[_screenqtkAudioPopup selectItemAtIndex: selectedDevice]; _avCurrentAudioDeviceUID = [[(AVCaptureDevice *)[_avaudioDevices objectAtIndex:selectedDevice] uniqueID] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
[_qtkAudioDevicePopup selectItemAtIndex: selectedDevice];
} }
- (IBAction)qtkToggleUIElements:(id)sender - (IBAction)qtkToggleUIElements:(id)sender

Loading…
Cancel
Save