diff --git a/glsm/glsm.c b/glsm/glsm.c index 18c27ae..a3dadaf 100644 --- a/glsm/glsm.c +++ b/glsm/glsm.c @@ -925,6 +925,14 @@ bool glsm_ctl(enum glsm_state_ctl state, void *data) case GLSM_CTL_UNSET_IMM_VBO: imm_vbo_enable = false; break; + case GLSM_CTL_PROC_ADDRESS_GET: + { + glsm_ctx_proc_address_t *proc = (glsm_ctx_proc_address_t*)data; + if (!hw_render.get_proc_address) + return false; + proc->addr = hw_render.get_proc_address; + } + break; case GLSM_CTL_STATE_CONTEXT_RESET: rglgen_resolve_symbols(hw_render.get_proc_address); break; diff --git a/include/glsm/glsm.h b/include/glsm/glsm.h index b68d20e..b552652 100644 --- a/include/glsm/glsm.h +++ b/include/glsm/glsm.h @@ -109,13 +109,19 @@ enum glsm_state_ctl GLSM_CTL_UNSET_IMM_VBO, GLSM_CTL_IMM_VBO_DISABLE, GLSM_CTL_IMM_VBO_DRAW, - GLSM_CTL_IS_FRAMEBUFFER_LOCKED + GLSM_CTL_IS_FRAMEBUFFER_LOCKED, + GLSM_CTL_PROC_ADDRESS_GET }; typedef bool (*glsm_imm_vbo_draw)(void *); typedef bool (*glsm_imm_vbo_disable)(void *); typedef bool (*glsm_framebuffer_lock)(void *); +typedef struct glsm_ctx_proc_address +{ + retro_get_proc_address_t addr; +} glsm_ctx_proc_address_t; + typedef struct glsm_ctx_params { glsm_framebuffer_lock framebuffer_lock;