[MPlayer-cvslog] r37962 - trunk/libvo/osx_objc_common.m

reimar subversion at mplayerhq.hu
Mon Sep 25 00:10:06 EEST 2017


Author: reimar
Date: Mon Sep 25 00:10:06 2017
New Revision: 37962

Log:
OSX: Avoid crashes in older OSX versions.

Try to handle the case where the enter/exitFullScreenMode
functions do not exist.

Modified:
   trunk/libvo/osx_objc_common.m

Modified: trunk/libvo/osx_objc_common.m
==============================================================================
--- trunk/libvo/osx_objc_common.m	Sun Sep 24 20:44:45 2017	(r37961)
+++ trunk/libvo/osx_objc_common.m	Mon Sep 25 00:10:06 2017	(r37962)
@@ -400,7 +400,9 @@ void vo_osx_swap_buffers(void)
 	//go fullscreen
 	if(vo_fs)
 	{
+		if ([window respondsToSelector:@selector(enterFullScreenMode)]) {
 		[window enterFullScreenMode:[self fullscreen_screen]];
+		}
 		if(!vo_rootwin)
 		{
 			SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
@@ -420,7 +422,9 @@ void vo_osx_swap_buffers(void)
 	}
 	else
 	{
+		if ([window respondsToSelector:@selector(exitFullScreenMode)]) {
 		[window exitFullScreenMode:[self fullscreen_screen]];
+		}
 		SetSystemUIMode( kUIModeNormal, 0);
 
 		CGDisplayShowCursor(kCGDirectMainDisplay);


More information about the MPlayer-cvslog mailing list