diff options
Diffstat (limited to 'osdep')
-rw-r--r-- | osdep/macosx_bundle.h | 26 | ||||
-rw-r--r-- | osdep/path-macosx.m (renamed from osdep/macosx_bundle.m) | 14 | ||||
-rw-r--r-- | osdep/path.h | 7 |
3 files changed, 14 insertions, 33 deletions
diff --git a/osdep/macosx_bundle.h b/osdep/macosx_bundle.h deleted file mode 100644 index fbb3383ad5..0000000000 --- a/osdep/macosx_bundle.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This file is part of mpv. - * - * mpv is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * mpv is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with mpv; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef MPV_MACOSX_BUNDLE -#define MPV_MACOSX_BUNDLE - -// Returns absolute path of a resource file in a Mac OS X application bundle. -char *get_bundled_path(const char *filename); - -#endif /* MPV_MACOSX_BUNDLE */ - diff --git a/osdep/macosx_bundle.m b/osdep/path-macosx.m index 3a1f3b5b0b..7446710ee5 100644 --- a/osdep/macosx_bundle.m +++ b/osdep/path-macosx.m @@ -17,14 +17,14 @@ */ #import <Foundation/Foundation.h> -#include "osdep/macosx_bundle.h" #include "mpvcore/path.h" +#include "osdep/path.h" -char *get_bundled_path(const char *file) +char *mp_get_macosx_bundled_path(const char *file) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSString *path = [[NSBundle mainBundle] resourcePath]; - char *rv = mp_path_join(NULL, bstr0([path UTF8String]), bstr0(file)); - [pool release]; - return rv; + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSString *path = [[NSBundle mainBundle] resourcePath]; + char *rv = mp_path_join(NULL, bstr0([path UTF8String]), bstr0(file)); + [pool release]; + return rv; } diff --git a/osdep/path.h b/osdep/path.h index 26b8cd344e..0a5091bc3d 100644 --- a/osdep/path.h +++ b/osdep/path.h @@ -1,8 +1,15 @@ #ifndef OSDEP_PATH_H #define OSDEP_PATH_H +#include "config.h" + #ifdef _WIN32 char *mp_get_win_config_path(const char *filename); #endif +#ifdef CONFIG_COCOA +// Returns absolute path of a resource file in a Mac OS X application bundle. +char *mp_get_macosx_bundled_path(const char *filename); +#endif + #endif |