Attempt a second method of getting proc

Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
This commit is contained in:
Mahyar Koshkouei 2017-12-28 20:35:07 +00:00
parent d5f933ed92
commit 1708fd4753
1 changed files with 14 additions and 6 deletions

View File

@ -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");