From 7346cea2666fb2cdcb4918ebdc05069f86297b21 Mon Sep 17 00:00:00 2001 From: Mahyar Koshkouei Date: Thu, 28 Dec 2017 19:19:44 +0000 Subject: [PATCH] Fix linking errors Now this actually compiles. Signed-off-by: Mahyar Koshkouei --- Makefile | 4 ++-- mpv-libretro.c | 18 ++++++------------ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index fa7f0a8..ad43ba7 100644 --- a/Makefile +++ b/Makefile @@ -104,7 +104,7 @@ else SHARED := -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=link.T -Wl,--no-undefined endif -LDFLAGS += $(LIBM) -lmpv +LDFLAGS += $(LIBM) -lmpv -lGL LIBRETRO-COM = -Ilibretro-common/include ifeq ($(DEBUG), 1) @@ -113,7 +113,7 @@ else CFLAGS += -O3 endif -OBJECTS := mpv-libretro.o libretro-common/glsm/glsm.o libretro-common/gfx/gl_capabilities.o +OBJECTS := mpv-libretro.o libretro-common/glsym/rglgen.o libretro-common/glsm/glsm.o CFLAGS += -Wall -pedantic $(LIBRETRO-COM) $(fpic) ifeq ($(GLES), 1) diff --git a/mpv-libretro.c b/mpv-libretro.c index 6e60680..8eb39b4 100644 --- a/mpv-libretro.c +++ b/mpv-libretro.c @@ -38,16 +38,6 @@ 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; @@ -244,8 +234,12 @@ bool retro_unserialize(const void *data_, size_t size) static void *get_proc_address_mpv(void *fn_ctx, const char *name) { printf("name: %s\n", name); - return hw_render.get_proc_address(name); - // return proc_cb(name); + 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(name); } bool retro_load_game(const struct retro_game_info *info)