From 6f6072214800c4ab2cff89776de0015c6662ab04 Mon Sep 17 00:00:00 2001 From: gpoirier Date: Mon, 24 Nov 2008 13:22:18 +0000 Subject: Allow vo_macosx to be compiled in 64-bits mode: - Replace usage of undocumented Apple function CPSEnableForegroundOperation() (which is available in 32-bits mode, but not in 64-bits mode) by TransformProcessType() which is public, documented, and available since OSX 10.3. - Work around Apple bug #6267445 since OSServices Power API is diabled in 64-bits systems Based on patch by Gregor Riepl %onitake A gmail P com% posted in thread: date: Fri, Oct 3, 2008 at 4:49 PM subject: Re: [MPlayer-dev-eng] [PATCH] Replaced deprecated QuickDraw calls in vo_quartz git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28022 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_macosx.m | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'libvo/vo_macosx.m') diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m index f21623c885..4bdcca1fc0 100644 --- a/libvo/vo_macosx.m +++ b/libvo/vo_macosx.m @@ -10,6 +10,12 @@ #include #include #include +#include +//special workaround for Apple bug #6267445 +//(OSServices Power API disabled in OSServices.h for 64bit systems) +#ifndef __POWER__ +#include +#endif //MPLAYER #include "config.h" @@ -328,8 +334,6 @@ static int preinit(const char *arg) { #if !defined (CONFIG_MACOSX_FINDER) || !defined (CONFIG_SDL) //this chunk of code is heavily based off SDL_macosx.m from SDL - //it uses an Apple private function to request foreground operation - void CPSEnableForegroundOperation(ProcessSerialNumber* psn); ProcessSerialNumber myProc, frProc; Boolean sameProc; @@ -339,7 +343,7 @@ static int preinit(const char *arg) { if (SameProcess(&frProc, &myProc, &sameProc) == noErr && !sameProc) { - CPSEnableForegroundOperation(&myProc); + TransformProcessType(&myProc, kProcessTransformToForegroundApplication); } SetFrontProcess(&myProc); } -- cgit v1.2.3 From a5581ec3b8cb219f050ff2e181b128f96d98be99 Mon Sep 17 00:00:00 2001 From: gpoirier Date: Tue, 25 Nov 2008 09:54:34 +0000 Subject: typo fix + readability improvement git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28035 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_macosx.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libvo/vo_macosx.m') diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m index 4bdcca1fc0..b70ccbc4e8 100644 --- a/libvo/vo_macosx.m +++ b/libvo/vo_macosx.m @@ -759,7 +759,7 @@ static int control(uint32_t request, void *data, ...) glFlush(); - //auto hide mouse cursor and futur on-screen control? + //auto hide mouse cursor (and future on-screen control?) if(isFullscreen && !mouseHide && !isRootwin) { int curTime = TickCount()/60; -- cgit v1.2.3