mirror of
https://github.com/libretro/RetroArch
synced 2025-01-27 03:35:22 +00:00
Add GFX_CTL_GET_VIDEO_OUTPUT_PREV/GFX_CTL_GET_VIDEO_OUTPUT_NEXT
This commit is contained in:
parent
00e4793bed
commit
ef6ef13143
@ -3404,12 +3404,12 @@ static void gl_get_video_output_size(void *data,
|
||||
|
||||
static void gl_get_video_output_prev(void *data)
|
||||
{
|
||||
gfx_ctx_get_video_output_prev();
|
||||
gfx_ctx_ctl(GFX_CTL_GET_VIDEO_OUTPUT_PREV, NULL);
|
||||
}
|
||||
|
||||
static void gl_get_video_output_next(void *data)
|
||||
{
|
||||
gfx_ctx_get_video_output_next();
|
||||
gfx_ctx_ctl(GFX_CTL_GET_VIDEO_OUTPUT_NEXT, NULL);
|
||||
}
|
||||
|
||||
void gl_load_texture_data(uint32_t id_data,
|
||||
|
@ -100,24 +100,6 @@ void gfx_ctx_get_video_output_size(unsigned *width, unsigned *height)
|
||||
current_video_context->get_video_output_size(video_context_data, width, height);
|
||||
}
|
||||
|
||||
bool gfx_ctx_get_video_output_prev(void)
|
||||
{
|
||||
if (!current_video_context
|
||||
|| !current_video_context->get_video_output_prev)
|
||||
return false;
|
||||
current_video_context->get_video_output_prev(video_context_data);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool gfx_ctx_get_video_output_next(void)
|
||||
{
|
||||
if (!current_video_context ||
|
||||
!current_video_context->get_video_output_next)
|
||||
return false;
|
||||
current_video_context->get_video_output_next(video_context_data);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool gfx_ctx_set_video_mode(
|
||||
unsigned width, unsigned height,
|
||||
bool fullscreen)
|
||||
@ -387,6 +369,18 @@ bool gfx_ctx_ctl(enum gfx_ctx_ctl_state state, void *data)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case GFX_CTL_GET_VIDEO_OUTPUT_PREV:
|
||||
if (!current_video_context
|
||||
|| !current_video_context->get_video_output_prev)
|
||||
return false;
|
||||
current_video_context->get_video_output_prev(video_context_data);
|
||||
break;
|
||||
case GFX_CTL_GET_VIDEO_OUTPUT_NEXT:
|
||||
if (!current_video_context ||
|
||||
!current_video_context->get_video_output_next)
|
||||
return false;
|
||||
current_video_context->get_video_output_next(video_context_data);
|
||||
break;
|
||||
case GFX_CTL_BIND_HW_RENDER:
|
||||
{
|
||||
bool *enable = (bool*)data;
|
||||
|
@ -62,7 +62,9 @@ enum gfx_ctx_ctl_state
|
||||
GFX_CTL_UPDATE_WINDOW_TITLE,
|
||||
GFX_CTL_SHOW_MOUSE,
|
||||
GFX_CTL_SET,
|
||||
GFX_CTL_BIND_HW_RENDER
|
||||
GFX_CTL_BIND_HW_RENDER,
|
||||
GFX_CTL_GET_VIDEO_OUTPUT_PREV,
|
||||
GFX_CTL_GET_VIDEO_OUTPUT_NEXT
|
||||
};
|
||||
|
||||
typedef void (*gfx_ctx_proc_t)(void);
|
||||
@ -239,10 +241,6 @@ void gfx_ctx_swap_interval(unsigned interval);
|
||||
|
||||
void gfx_ctx_get_video_output_size(unsigned *width, unsigned *height);
|
||||
|
||||
bool gfx_ctx_get_video_output_prev(void);
|
||||
|
||||
bool gfx_ctx_get_video_output_next(void);
|
||||
|
||||
const char *gfx_ctx_get_ident(void);
|
||||
|
||||
void gfx_ctx_input_driver(
|
||||
|
@ -1492,22 +1492,18 @@ bool video_driver_ctl(enum rarch_display_ctl_state state, void *data)
|
||||
if (!video_driver_poke)
|
||||
return false;
|
||||
|
||||
if (video_driver_poke->get_video_output_next)
|
||||
{
|
||||
video_driver_poke->get_video_output_next(video_driver_data);
|
||||
return true;
|
||||
}
|
||||
return gfx_ctx_get_video_output_next();
|
||||
if (!video_driver_poke->get_video_output_next)
|
||||
return gfx_ctx_ctl(GFX_CTL_GET_VIDEO_OUTPUT_NEXT, NULL);
|
||||
video_driver_poke->get_video_output_next(video_driver_data);
|
||||
break;
|
||||
case RARCH_DISPLAY_CTL_GET_PREV_VIDEO_OUT:
|
||||
if (!video_driver_poke)
|
||||
return false;
|
||||
|
||||
if (video_driver_poke->get_video_output_prev)
|
||||
{
|
||||
video_driver_poke->get_video_output_prev(video_driver_data);
|
||||
return true;
|
||||
}
|
||||
return gfx_ctx_get_video_output_next();
|
||||
if (!video_driver_poke->get_video_output_prev)
|
||||
return gfx_ctx_ctl(GFX_CTL_GET_VIDEO_OUTPUT_NEXT, NULL);
|
||||
video_driver_poke->get_video_output_prev(video_driver_data);
|
||||
break;
|
||||
case RARCH_DISPLAY_CTL_INIT:
|
||||
return init_video();
|
||||
case RARCH_DISPLAY_CTL_DESTROY_DATA:
|
||||
|
Loading…
x
Reference in New Issue
Block a user