diff --git a/Makefile b/Makefile index 440f51b..fa7f0a8 100644 --- a/Makefile +++ b/Makefile @@ -105,6 +105,7 @@ else endif LDFLAGS += $(LIBM) -lmpv +LIBRETRO-COM = -Ilibretro-common/include ifeq ($(DEBUG), 1) CFLAGS += -O0 -g @@ -112,8 +113,8 @@ else CFLAGS += -O3 endif -OBJECTS := mpv-libretro.o glsym/rglgen.o -CFLAGS += -Wall -pedantic $(fpic) +OBJECTS := mpv-libretro.o libretro-common/glsm/glsm.o libretro-common/gfx/gl_capabilities.o +CFLAGS += -Wall -pedantic $(LIBRETRO-COM) $(fpic) ifeq ($(GLES), 1) CFLAGS += -DHAVE_OPENGLES -DHAVE_OPENGLES2 diff --git a/mpv-libretro.c b/mpv-libretro.c index 77dbcbd..6e60680 100644 --- a/mpv-libretro.c +++ b/mpv-libretro.c @@ -7,8 +7,8 @@ #include #include -#include "glsym/glsym.h" -#include "libretro.h" +#include +#include static struct retro_hw_render_callback hw_render; @@ -38,6 +38,16 @@ static void fallback_log(enum retro_log_level level, const char *fmt, ...) va_end(va); } +void *VidExt_GL_GetProcAddress(const char* Proc) +{ + glsm_ctx_proc_address_t proc_info; + proc_info.addr = NULL; + if (!glsm_ctl(GLSM_CTL_PROC_ADDRESS_GET, NULL)) + return NULL; + + return proc_info.addr(Proc); +} + void retro_init(void) { return;