mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 18:40:49 +00:00
Update GLSM
This commit is contained in:
parent
22424fce0f
commit
f1e7e0c5f7
@ -2800,10 +2800,8 @@ static bool glsm_state_ctx_destroy(void *data)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool glsm_state_ctx_init(void *data)
|
||||
static bool glsm_state_ctx_init(glsm_ctx_params_t *params)
|
||||
{
|
||||
glsm_ctx_params_t *params = (glsm_ctx_params_t*)data;
|
||||
|
||||
if (!params || !params->environ_cb)
|
||||
return false;
|
||||
|
||||
@ -2817,15 +2815,16 @@ static bool glsm_state_ctx_init(void *data)
|
||||
#else
|
||||
hw_render.context_type = RETRO_HW_CONTEXT_OPENGLES2;
|
||||
#endif
|
||||
#else
|
||||
#ifdef CORE
|
||||
hw_render.context_type = RETRO_HW_CONTEXT_OPENGL_CORE;
|
||||
hw_render.version_major = 3;
|
||||
hw_render.version_minor = 3;
|
||||
#else
|
||||
hw_render.context_type = RETRO_HW_CONTEXT_OPENGL;
|
||||
if (params->context_type != RETRO_HW_CONTEXT_NONE)
|
||||
hw_render.context_type = params->context_type;
|
||||
if (params->major != 0)
|
||||
hw_render.version_major = params->major;
|
||||
if (params->minor != 0)
|
||||
hw_render.version_minor = params->minor;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
hw_render.context_reset = params->context_reset;
|
||||
hw_render.context_destroy = params->context_destroy;
|
||||
hw_render.stencil = params->stencil;
|
||||
@ -2873,7 +2872,7 @@ bool glsm_ctl(enum glsm_state_ctl state, void *data)
|
||||
glsm_state_ctx_destroy(data);
|
||||
break;
|
||||
case GLSM_CTL_STATE_CONTEXT_INIT:
|
||||
return glsm_state_ctx_init(data);
|
||||
return glsm_state_ctx_init((glsm_ctx_params_t*)data);
|
||||
case GLSM_CTL_STATE_SETUP:
|
||||
glsm_state_setup();
|
||||
break;
|
||||
|
@ -146,6 +146,7 @@ typedef struct glsm_ctx_params
|
||||
bool stencil;
|
||||
unsigned major;
|
||||
unsigned minor;
|
||||
enum retro_hw_context_type context_type;
|
||||
} glsm_ctx_params_t;
|
||||
|
||||
GLuint glsm_get_current_framebuffer(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user