diff options
Diffstat (limited to 'libvo/cocoa_common.m')
-rw-r--r-- | libvo/cocoa_common.m | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libvo/cocoa_common.m b/libvo/cocoa_common.m index 63e8e90db4..5cc29cc78b 100644 --- a/libvo/cocoa_common.m +++ b/libvo/cocoa_common.m @@ -21,6 +21,8 @@ #import <OpenGL/OpenGL.h> #import <QuartzCore/QuartzCore.h> #import <CoreServices/CoreServices.h> // for CGDisplayHideCursor +#include <dlfcn.h> + #include "cocoa_common.h" #include "options.h" @@ -117,6 +119,19 @@ bool vo_cocoa_gui_running(void) return !!s; } +void *vo_cocoa_glgetaddr(const char *s) +{ + void *ret = NULL; + void *handle = dlopen( + "/System/Library/Frameworks/OpenGL.framework/OpenGL", + RTLD_LAZY | RTLD_LOCAL); + if (!handle) + return NULL; + ret = dlsym(handle, s); + dlclose(handle); + return ret; +} + int vo_cocoa_init(struct vo *vo) { s = vo_cocoa_init_state(); |