diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-04-26 17:42:20 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-04-26 17:42:20 +0300 |
commit | 4785c2617ee9ac186464a55c1bfb13a5781ef041 (patch) | |
tree | 2424f18b68b2037bd4e290471821e9adae28b876 /libvo | |
parent | 2732d5efbae3e0ee28bc6b70ceab1eb77e593216 (diff) | |
parent | 38abe6ff7a3810f8e01b6296570e92df1b12b09c (diff) | |
download | mpv-4785c2617ee9ac186464a55c1bfb13a5781ef041.tar.bz2 mpv-4785c2617ee9ac186464a55c1bfb13a5781ef041.tar.xz |
Merge svn changes up to r30967
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/font_load_ft.c | 2 | ||||
-rw-r--r-- | libvo/osx_common.c | 23 | ||||
-rw-r--r-- | libvo/osx_common.h | 1 | ||||
-rw-r--r-- | libvo/vo_corevideo.m | 18 | ||||
-rw-r--r-- | libvo/vo_dxr2.c | 2 | ||||
-rw-r--r-- | libvo/vo_kva.c | 2 | ||||
-rw-r--r-- | libvo/vo_matrixview.c | 2 | ||||
-rw-r--r-- | libvo/vo_quartz.c | 22 | ||||
-rw-r--r-- | libvo/vo_wii.c | 2 |
9 files changed, 31 insertions, 43 deletions
diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c index cd809e2bcb..1cd6fb5733 100644 --- a/libvo/font_load_ft.c +++ b/libvo/font_load_ft.c @@ -47,7 +47,7 @@ #include "font_load.h" #include "mp_msg.h" #include "mplayer.h" -#include "get_path.h" +#include "path.h" #include "osd_font.h" #if (FREETYPE_MAJOR > 2) || (FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 1) diff --git a/libvo/osx_common.c b/libvo/osx_common.c index e82bc7aa6e..b3e39a62aa 100644 --- a/libvo/osx_common.c +++ b/libvo/osx_common.c @@ -19,6 +19,7 @@ // only to get keycode definitions from HIToolbox/Events.h #include <Carbon/Carbon.h> +#include "config.h" #include "osx_common.h" #include "old_vo_defines.h" #include "video_out.h" @@ -141,3 +142,25 @@ void config_movie_aspect(float config_aspect) old_movie_aspect = config_aspect; our_aspect_change = 0; } + +/** This chunk of code is heavily based off SDL_macosx.m from SDL. + * The CPSEnableForegroundOperation that was here before is private + * and should not be used. + * Replaced by a call to the 10.3+ TransformProcessType. + */ +void osx_foreground_hack(void) +{ +#if !defined (CONFIG_MACOSX_FINDER) || !defined (CONFIG_SDL) + ProcessSerialNumber myProc, frProc; + Boolean sameProc; + + if (GetFrontProcess(&frProc) == noErr && + GetCurrentProcess(&myProc) == noErr) { + if (SameProcess(&frProc, &myProc, &sameProc) == noErr && !sameProc) { + TransformProcessType(&myProc, + kProcessTransformToForegroundApplication); + } + SetFrontProcess(&myProc); + } +#endif +} diff --git a/libvo/osx_common.h b/libvo/osx_common.h index d20698e411..21bb3d8548 100644 --- a/libvo/osx_common.h +++ b/libvo/osx_common.h @@ -22,5 +22,6 @@ int convert_key(unsigned key, unsigned charcode); void change_movie_aspect(float new_aspect); void config_movie_aspect(float config_aspect); +void osx_foreground_hack(void); #endif /* MPLAYER_OSX_COMMON_H */ diff --git a/libvo/vo_corevideo.m b/libvo/vo_corevideo.m index 9cd3447072..be45813f8c 100644 --- a/libvo/vo_corevideo.m +++ b/libvo/vo_corevideo.m @@ -386,23 +386,7 @@ static int preinit(const char *arg) NSApp = [NSApplication sharedApplication]; isLeopardOrLater = floor(NSAppKitVersionNumber) > 824; - #if !defined (CONFIG_MACOSX_FINDER) || !defined (CONFIG_SDL) - //this chunk of code is heavily based off SDL_macosx.m from SDL - ProcessSerialNumber myProc, frProc; - Boolean sameProc; - - if (GetFrontProcess(&frProc) == noErr) - { - if (GetCurrentProcess(&myProc) == noErr) - { - if (SameProcess(&frProc, &myProc, &sameProc) == noErr && !sameProc) - { - TransformProcessType(&myProc, kProcessTransformToForegroundApplication); - } - SetFrontProcess(&myProc); - } - } - #endif + osx_foreground_hack(); if(!mpGLView) { diff --git a/libvo/vo_dxr2.c b/libvo/vo_dxr2.c index 66f73f1d6d..defede12ad 100644 --- a/libvo/vo_dxr2.c +++ b/libvo/vo_dxr2.c @@ -35,7 +35,7 @@ #include "mp_msg.h" #include "m_option.h" #include "sub.h" -#include "get_path.h" +#include "path.h" #include "libmpdemux/mpeg_packetizer.h" #include "x11_common.h" diff --git a/libvo/vo_kva.c b/libvo/vo_kva.c index 605d3730cb..07f6629769 100644 --- a/libvo/vo_kva.c +++ b/libvo/vo_kva.c @@ -60,7 +60,7 @@ static const vo_info_t info = { "" }; -LIBVO_EXTERN(kva) +const LIBVO_EXTERN(kva) #define WC_MPLAYER "WC_MPLAYER" diff --git a/libvo/vo_matrixview.c b/libvo/vo_matrixview.c index 7cc142a071..496d122a4c 100644 --- a/libvo/vo_matrixview.c +++ b/libvo/vo_matrixview.c @@ -44,7 +44,7 @@ static const vo_info_t info = { "Based on MatrixView from rss-glx.sf.net" }; -LIBVO_EXTERN(matrixview) +const LIBVO_EXTERN(matrixview) static MPGLContext glctx; diff --git a/libvo/vo_quartz.c b/libvo/vo_quartz.c index 42c9eb4ed4..5c06adf437 100644 --- a/libvo/vo_quartz.c +++ b/libvo/vo_quartz.c @@ -1088,27 +1088,7 @@ 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 - // the CPSEnableForegroundOperation that was here before is private and shouldn't be used - // replaced by a call to the 10.3+ TransformProcessType - { - ProcessSerialNumber myProc, frProc; - Boolean sameProc; - - if (GetFrontProcess(&frProc) == noErr) - { - if (GetCurrentProcess(&myProc) == noErr) - { - if (SameProcess(&frProc, &myProc, &sameProc) == noErr && !sameProc) - { - TransformProcessType(&myProc, kProcessTransformToForegroundApplication); - } - SetFrontProcess(&myProc); - } - } - } -#endif + osx_foreground_hack(); return 0; } diff --git a/libvo/vo_wii.c b/libvo/vo_wii.c index 8999852d80..148e641bdb 100644 --- a/libvo/vo_wii.c +++ b/libvo/vo_wii.c @@ -61,7 +61,7 @@ static const vo_info_t info = { "" }; -LIBVO_EXTERN(wii) +const LIBVO_EXTERN(wii) static signed int pre_init_err = -2; |