int i_full = 1;
SEL sel = @selector(setFullscreen:forWindow:);
- NSInvocation *inv = [NSInvocation invocationWithMethodSignature:[[VLCMain sharedInstance] methodSignatureForSelector:sel]];
- [inv setTarget:[VLCMain sharedInstance]];
+ NSInvocation *inv = [NSInvocation invocationWithMethodSignature:[[[VLCMain sharedInstance] voutController] methodSignatureForSelector:sel]];
+ [inv setTarget:[[VLCMain sharedInstance] voutController]];
[inv setSelector:sel];
[inv setArgument:&i_full atIndex:2];
[inv setArgument:&p_wnd atIndex:3];
int i_full = va_arg(args, int);
SEL sel = @selector(setFullscreen:forWindow:);
- NSInvocation *inv = [NSInvocation invocationWithMethodSignature:[[VLCMain sharedInstance] methodSignatureForSelector:sel]];
- [inv setTarget:[VLCMain sharedInstance]];
+ NSInvocation *inv = [NSInvocation invocationWithMethodSignature:[[[VLCMain sharedInstance] voutController] methodSignatureForSelector:sel]];
+ [inv setTarget:[[VLCMain sharedInstance] voutController]];
[inv setSelector:sel];
[inv setArgument:&i_full atIndex:2]; // starting at 2!
[inv setArgument:&p_wnd atIndex:3];
int keyRepeat = (keyFlags & 0x1);
if (keyCode == NX_KEYTYPE_PLAY && keyState == 0)
- [[VLCCoreInteraction sharedInstance] play];
+ [[VLCCoreInteraction sharedInstance] playOrPause];
if ((keyCode == NX_KEYTYPE_FAST || keyCode == NX_KEYTYPE_NEXT) && !b_mediakeyJustJumped) {
if (keyState == 0 && keyRepeat == 0)
[[VLCCoreInteraction sharedInstance] toggleFullscreen];
break;
case k2009RemoteButtonPlay:
- [[VLCCoreInteraction sharedInstance] play];
+ [[VLCCoreInteraction sharedInstance] playOrPause];
break;
case kRemoteButtonPlay:
if (count >= 2)
[[VLCCoreInteraction sharedInstance] toggleFullscreen];
else
- [[VLCCoreInteraction sharedInstance] play];
+ [[VLCCoreInteraction sharedInstance] playOrPause];
break;
case kRemoteButtonVolume_Plus:
if (config_GetInt(VLCIntf, "macosx-appleremote-sysvol"))
}
if (key == 0x0020) { // space key
- [[VLCCoreInteraction sharedInstance] play];
+ [[VLCCoreInteraction sharedInstance] playOrPause];
return YES;
}
#pragma mark -
#pragma mark Interface updaters
-- (void)setFullscreen:(int)i_full forWindow:(vout_window_t *)p_wnd
-{
- if (!p_intf || (!b_nativeFullscreenMode && !p_wnd))
- return;
- playlist_t * p_playlist = pl_Get(p_intf);
- BOOL b_fullscreen = i_full;
-
- if (!var_GetBool(p_playlist, "fullscreen") != !b_fullscreen)
- var_SetBool(p_playlist, "fullscreen", b_fullscreen);
-
- if (b_nativeFullscreenMode) {
- // this is called twice in certain situations, so only toogle if we really need to
- if ((b_fullscreen && !([NSApp currentSystemPresentationOptions] & NSApplicationPresentationFullScreen)) ||
- (!b_fullscreen && ([NSApp currentSystemPresentationOptions] & NSApplicationPresentationFullScreen)))
- [o_mainwindow toggleFullScreen: self];
-
- if (b_fullscreen)
- [NSApp setPresentationOptions:(NSApplicationPresentationFullScreen | NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
- else
- [NSApp setPresentationOptions:(NSApplicationPresentationDefault)];
- } else {
- assert(p_wnd);
-
- if (b_fullscreen) {
- input_thread_t * p_input = pl_CurrentInput(p_intf);
- if (p_input != NULL && [self activeVideoPlayback]) {
- // activate app, as method can also be triggered from outside the app (prevents nasty window layout)
- [NSApp activateIgnoringOtherApps:YES];
- [o_vout_controller updateWindow:p_wnd withSelector:@selector(enterFullscreen)];
-
- }
- if (p_input)
- vlc_object_release(p_input);
- } else {
- // leaving fullscreen is always allowed
- [o_vout_controller updateWindow:p_wnd withSelector:@selector(leaveFullscreen)];
- }
- }
-}
- (void)PlaylistItemChanged
{