diff --git a/mpv-libretro.c b/mpv-libretro.c index 3db70a7..abb04c7 100644 --- a/mpv-libretro.c +++ b/mpv-libretro.c @@ -234,6 +234,8 @@ bool retro_unserialize(const void *data_, size_t size) static void *get_proc_address_mpv(void *fn_ctx, const char *name) { +#if 0 + /* This doesn't work */ glsm_ctx_proc_address_t proc_info; proc_info.addr = NULL; @@ -244,12 +246,24 @@ static void *get_proc_address_mpv(void *fn_ctx, const char *name) } return proc_info.addr(name); +#endif + /* This doesn't work either */ + rglgen_resolve_symbols(hw_render.get_proc_address); + log_cb(RETRO_LOG_INFO, "attempting to obtain %s proc using %p at %p\n", name, + hw_render.get_proc_address, hw_render.get_proc_address(name)); + return hw_render.get_proc_address(name); } bool retro_load_game(const struct retro_game_info *info) { const char *cmd[] = {"loadfile", info->path, NULL}; + if(!retro_init_hw_context()) + { + log_cb(RETRO_LOG_ERROR, "HW Context could not be initialized\n"); + return false; + } + mpv = mpv_create(); if(!mpv) @@ -288,12 +302,6 @@ bool retro_load_game(const struct retro_game_info *info) return false; } - if(!retro_init_hw_context()) - { - log_cb(RETRO_LOG_ERROR, "HW Context could not be initialized\n"); - return false; - } - if(mpv_command(mpv, cmd) != 0) { log_cb(RETRO_LOG_ERROR, "failed issue mpv_command\n");