Cleanups - don't set core profile bit immediately

This commit is contained in:
twinaphex 2018-10-10 05:30:50 +02:00
parent a31cf3c868
commit 4ed151fb35

View File

@ -955,16 +955,8 @@ static bool dynamic_request_hw_context(enum retro_hw_context_type type,
break; break;
case RETRO_HW_CONTEXT_OPENGL_CORE: case RETRO_HW_CONTEXT_OPENGL_CORE:
{ RARCH_LOG("Requesting core OpenGL context (%u.%u).\n",
gfx_ctx_flags_t flags; major, minor);
flags.flags = 0;
BIT32_SET(flags.flags, GFX_CTX_FLAGS_GL_CORE_CONTEXT);
video_context_driver_set_flags(&flags);
RARCH_LOG("Requesting core OpenGL context (%u.%u).\n",
major, minor);
}
break; break;
#endif #endif
@ -1374,6 +1366,15 @@ bool rarch_environment_cb(unsigned cmd, void *data)
if (!dynamic_verify_hw_context(cb->context_type, cb->version_minor, cb->version_major)) if (!dynamic_verify_hw_context(cb->context_type, cb->version_minor, cb->version_major))
return false; return false;
if (cb->context_type == RETRO_HW_CONTEXT_OPENGL_CORE)
{
gfx_ctx_flags_t flags;
flags.flags = 0;
BIT32_SET(flags.flags, GFX_CTX_FLAGS_GL_CORE_CONTEXT);
video_context_driver_set_flags(&flags);
}
cb->get_current_framebuffer = video_driver_get_current_framebuffer; cb->get_current_framebuffer = video_driver_get_current_framebuffer;
cb->get_proc_address = video_driver_get_proc_address; cb->get_proc_address = video_driver_get_proc_address;