summaryrefslogtreecommitdiffstats
path: root/osdep/path-macosx.m
diff options
context:
space:
mode:
Diffstat (limited to 'osdep/path-macosx.m')
-rw-r--r--osdep/path-macosx.m16
1 files changed, 9 insertions, 7 deletions
diff --git a/osdep/path-macosx.m b/osdep/path-macosx.m
index ee34f9638b..618f2038c8 100644
--- a/osdep/path-macosx.m
+++ b/osdep/path-macosx.m
@@ -19,12 +19,14 @@
#include "options/path.h"
#include "osdep/path.h"
-int mp_add_macosx_bundle_dir(struct mpv_global *global, char **dirs, int i)
+const char *mp_get_platform_path_osx(void *talloc_ctx, const char *type)
{
- void *talloc_ctx = dirs;
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- NSString *path = [[NSBundle mainBundle] resourcePath];
- dirs[i++] = talloc_strdup(talloc_ctx, [path UTF8String]);
- [pool release];
- return i;
+ if (strcmp(type, "osxbundle") == 0) {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ NSString *path = [[NSBundle mainBundle] resourcePath];
+ char *res = talloc_strdup(talloc_ctx, [path UTF8String]);
+ [pool release];
+ return res;
+ }
+ return NULL;
}