mirror of
https://code.videolan.org/videolan/vlc
synced 2024-08-18 23:45:06 +02:00
macosx/main menu: fix menu item validation for items depending on input capabilities
This commit is contained in:
parent
75360ce4f2
commit
ad7e1e4091
@ -95,6 +95,7 @@
|
||||
{
|
||||
_timeSelectionPanel = [[VLCTimeSelectionPanelController alloc] init];
|
||||
_playlistController = [[VLCMain sharedInstance] playlistController];
|
||||
_playerController = _playlistController.playerController;
|
||||
|
||||
/* check whether the user runs OSX with a RTL language */
|
||||
NSArray* languages = [NSLocale preferredLanguages];
|
||||
|
@ -498,11 +498,11 @@ static const struct vlc_player_aout_cbs player_aout_callbacks = {
|
||||
|
||||
- (void)capabilitiesChanged:(int)newCapabilities
|
||||
{
|
||||
_seekable = newCapabilities & VLC_INPUT_CAPABILITIES_SEEKABLE;
|
||||
_rewindable = newCapabilities & VLC_INPUT_CAPABILITIES_REWINDABLE;
|
||||
_pausable = newCapabilities & VLC_INPUT_CAPABILITIES_PAUSEABLE;
|
||||
_recordable = newCapabilities & VLC_INPUT_CAPABILITIES_RECORDABLE;
|
||||
_rateChangable = newCapabilities & VLC_INPUT_CAPABILITIES_CHANGE_RATE;
|
||||
_seekable = newCapabilities & VLC_INPUT_CAPABILITIES_SEEKABLE ? YES : NO;
|
||||
_rewindable = newCapabilities & VLC_INPUT_CAPABILITIES_REWINDABLE ? YES : NO;
|
||||
_pausable = newCapabilities & VLC_INPUT_CAPABILITIES_PAUSEABLE ? YES : NO;
|
||||
_recordable = newCapabilities & VLC_INPUT_CAPABILITIES_RECORDABLE ? YES : NO;
|
||||
_rateChangable = newCapabilities & VLC_INPUT_CAPABILITIES_CHANGE_RATE ? YES : NO;
|
||||
[_defaultNotificationCenter postNotificationName:VLCPlayerCapabilitiesChanged
|
||||
object:self];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user