mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 09:40:06 +00:00
Add RARCH_DISPLAY_CTL_GET_NEXT_VIDEO_OUT
This commit is contained in:
parent
b4ec6e208b
commit
e09e65e348
@ -243,7 +243,7 @@ bool gfx_ctx_check_window(void *data, bool *quit, bool *resize,
|
|||||||
if (!data)
|
if (!data)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
ctx->check_window(data, quit, resize, width, height, *frame_count);
|
ctx->check_window(data, quit, resize, width, height, (unsigned int)*frame_count);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -776,27 +776,6 @@ void video_driver_set_filtering(unsigned index, bool smooth)
|
|||||||
poke->set_filtering(driver->video_data, index, smooth);
|
poke->set_filtering(driver->video_data, index, smooth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void video_driver_get_video_output_next(void)
|
|
||||||
{
|
|
||||||
driver_t *driver = driver_get_ptr();
|
|
||||||
const video_poke_interface_t *poke = video_driver_get_poke_ptr(driver);
|
|
||||||
|
|
||||||
if (poke && poke->get_video_output_next)
|
|
||||||
poke->get_video_output_next(driver->video_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
void video_driver_get_video_output_prev(void)
|
|
||||||
{
|
|
||||||
driver_t *driver = driver_get_ptr();
|
|
||||||
const video_poke_interface_t *poke = video_driver_get_poke_ptr(driver);
|
|
||||||
|
|
||||||
if (poke && poke->get_video_output_prev)
|
|
||||||
poke->get_video_output_prev(driver->video_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void video_driver_cached_frame_set_ptr(const void *data)
|
void video_driver_cached_frame_set_ptr(const void *data)
|
||||||
{
|
{
|
||||||
if (!data)
|
if (!data)
|
||||||
@ -1144,6 +1123,16 @@ bool video_driver_ctl(enum rarch_display_ctl_state state, void *data)
|
|||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
|
case RARCH_DISPLAY_CTL_GET_NEXT_VIDEO_OUT:
|
||||||
|
if (!poke || !poke->get_video_output_next)
|
||||||
|
return false;
|
||||||
|
poke->get_video_output_next(driver->video_data);
|
||||||
|
return true;
|
||||||
|
case RARCH_DISPLAY_CTL_GET_PREV_VIDEO_OUT:
|
||||||
|
if (!poke || !poke->get_video_output_prev)
|
||||||
|
return false;
|
||||||
|
poke->get_video_output_prev(driver->video_data);
|
||||||
|
return true;
|
||||||
case RARCH_DISPLAY_CTL_INIT:
|
case RARCH_DISPLAY_CTL_INIT:
|
||||||
return init_video();
|
return init_video();
|
||||||
case RARCH_DISPLAY_CTL_DEINIT:
|
case RARCH_DISPLAY_CTL_DEINIT:
|
||||||
@ -1205,9 +1194,8 @@ bool video_driver_ctl(enum rarch_display_ctl_state state, void *data)
|
|||||||
if (!ptr)
|
if (!ptr)
|
||||||
return false;
|
return false;
|
||||||
*ptr = &video_frame_count;
|
*ptr = &video_frame_count;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
break;
|
return true;
|
||||||
case RARCH_DISPLAY_CTL_FRAME_FILTER_ALIVE:
|
case RARCH_DISPLAY_CTL_FRAME_FILTER_ALIVE:
|
||||||
if (video_state.filter.filter)
|
if (video_state.filter.filter)
|
||||||
return true;
|
return true;
|
||||||
|
@ -229,6 +229,8 @@ enum rarch_display_ctl_state
|
|||||||
RARCH_DISPLAY_CTL_FIND_DRIVER,
|
RARCH_DISPLAY_CTL_FIND_DRIVER,
|
||||||
RARCH_DISPLAY_CTL_FRAME_FILTER_ALIVE,
|
RARCH_DISPLAY_CTL_FRAME_FILTER_ALIVE,
|
||||||
RARCH_DISPLAY_CTL_FRAME_FILTER_IS_32BIT,
|
RARCH_DISPLAY_CTL_FRAME_FILTER_IS_32BIT,
|
||||||
|
RARCH_DISPLAY_CTL_GET_PREV_VIDEO_OUT,
|
||||||
|
RARCH_DISPLAY_CTL_GET_NEXT_VIDEO_OUT,
|
||||||
RARCH_DISPLAY_CTL_HAS_WINDOWED,
|
RARCH_DISPLAY_CTL_HAS_WINDOWED,
|
||||||
RARCH_DISPLAY_CTL_IS_FOCUSED,
|
RARCH_DISPLAY_CTL_IS_FOCUSED,
|
||||||
RARCH_DISPLAY_CTL_SET_ASPECT_RATIO,
|
RARCH_DISPLAY_CTL_SET_ASPECT_RATIO,
|
||||||
@ -325,10 +327,6 @@ void * video_driver_read_frame_raw(unsigned *width,
|
|||||||
|
|
||||||
void video_driver_set_filtering(unsigned index, bool smooth);
|
void video_driver_set_filtering(unsigned index, bool smooth);
|
||||||
|
|
||||||
void video_driver_get_video_output_next(void);
|
|
||||||
|
|
||||||
void video_driver_get_video_output_prev(void);
|
|
||||||
|
|
||||||
bool video_driver_suppress_screensaver(bool enable);
|
bool video_driver_suppress_screensaver(bool enable);
|
||||||
|
|
||||||
const char *video_driver_get_ident(void);
|
const char *video_driver_get_ident(void);
|
||||||
|
@ -293,7 +293,7 @@ static int action_left_video_resolution(unsigned type, const char *label,
|
|||||||
[global->console.screen.resolutions.current.idx];
|
[global->console.screen.resolutions.current.idx];
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
video_driver_get_video_output_prev();
|
video_driver_ctl(RARCH_DISPLAY_CTL_GET_VIDEO_OUT_PREV, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -318,7 +318,7 @@ static int action_right_video_resolution(unsigned type, const char *label,
|
|||||||
[global->console.screen.resolutions.current.idx];
|
[global->console.screen.resolutions.current.idx];
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
video_driver_get_video_output_next();
|
video_driver_ctl(RARCH_DISPLAY_CTL_GET_VIDEO_OUT_NEXT, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user