mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-02 21:37:14 +00:00
Add GFX_CTL_BIND_HW_RENDER
This commit is contained in:
parent
b7c41c9fcd
commit
00e4793bed
@ -114,7 +114,7 @@ static const GLfloat white_color[] = {
|
||||
static INLINE void context_bind_hw_render(gl_t *gl, bool enable)
|
||||
{
|
||||
if (gl && gl->shared_context_use)
|
||||
gfx_ctx_bind_hw_render(enable);
|
||||
gfx_ctx_ctl(GFX_CTL_BIND_HW_RENDER, &enable);
|
||||
}
|
||||
|
||||
static INLINE bool gl_query_extension(gl_t *gl, const char *ext)
|
||||
|
@ -118,13 +118,6 @@ bool gfx_ctx_get_video_output_next(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
void gfx_ctx_bind_hw_render(bool enable)
|
||||
{
|
||||
if (current_video_context->bind_hw_render)
|
||||
current_video_context->bind_hw_render(video_context_data, enable);
|
||||
}
|
||||
|
||||
|
||||
bool gfx_ctx_set_video_mode(
|
||||
unsigned width, unsigned height,
|
||||
bool fullscreen)
|
||||
@ -394,6 +387,14 @@ bool gfx_ctx_ctl(enum gfx_ctx_ctl_state state, void *data)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case GFX_CTL_BIND_HW_RENDER:
|
||||
{
|
||||
bool *enable = (bool*)data;
|
||||
if (!current_video_context || !current_video_context->bind_hw_render)
|
||||
return false;
|
||||
current_video_context->bind_hw_render(video_context_data, *enable);
|
||||
}
|
||||
break;
|
||||
case GFX_CTL_SET:
|
||||
if (!data)
|
||||
return false;
|
||||
|
@ -61,7 +61,8 @@ enum gfx_ctx_ctl_state
|
||||
GFX_CTL_HAS_WINDOWED,
|
||||
GFX_CTL_UPDATE_WINDOW_TITLE,
|
||||
GFX_CTL_SHOW_MOUSE,
|
||||
GFX_CTL_SET
|
||||
GFX_CTL_SET,
|
||||
GFX_CTL_BIND_HW_RENDER
|
||||
};
|
||||
|
||||
typedef void (*gfx_ctx_proc_t)(void);
|
||||
@ -236,8 +237,6 @@ bool gfx_ctx_set_resize(unsigned width, unsigned height);
|
||||
|
||||
void gfx_ctx_swap_interval(unsigned interval);
|
||||
|
||||
void gfx_ctx_bind_hw_render(bool enable);
|
||||
|
||||
void gfx_ctx_get_video_output_size(unsigned *width, unsigned *height);
|
||||
|
||||
bool gfx_ctx_get_video_output_prev(void);
|
||||
|
Loading…
Reference in New Issue
Block a user