Skip to content

Commit ccaf101

Browse files
committed
macOS: Add support in get_proc_address
This allows celluloid to function within macOS, currently tested within macOS 26 Tahoe on an m4 mac mini Signed-off-by: Zach Bacon <zachbacon@vba-m.com>
1 parent c977dfb commit ccaf101

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/celluloid-mpv.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
#include <gdk/win32/gdkwin32.h>
4242
#include <epoxy/wgl.h>
4343
#endif
44+
#ifdef GDK_WINDOWING_MACOS
45+
#include <gdk/macos/gdkmacos.h>
46+
#include <dlfcn.h>
47+
#endif
4448

4549
#include "celluloid-mpv.h"
4650
#include "celluloid-common.h"
@@ -151,6 +155,10 @@ get_proc_address(void *fn_ctx, const gchar *name)
151155
#ifdef GDK_WINDOWING_WIN32
152156
if (GDK_IS_WIN32_DISPLAY(display))
153157
return wglGetProcAddress(name);
158+
#endif
159+
#ifdef GDK_WINDOWING_MACOS
160+
if (GDK_IS_MACOS_DISPLAY(display))
161+
return dlsym(RTLD_DEFAULT, name);
154162
#endif
155163
g_assert_not_reached();
156164
return NULL;

0 commit comments

Comments
 (0)