mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Clear out rest of video_driver_ctl use.
This commit is contained in:
parent
d723411436
commit
66c4f608e6
@ -1406,7 +1406,7 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
* important that it works for consoles right now */
|
||||
config_get_bool(conf, "custom_bgm_enable",
|
||||
&global->console.sound.system_bgm_enable);
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_LOAD_SETTINGS, conf);
|
||||
video_driver_load_settings(conf);
|
||||
#endif
|
||||
CONFIG_GET_INT_BASE(conf, settings, state_slot, "state_slot");
|
||||
|
||||
|
@ -913,29 +913,25 @@ static bool d3d_has_windowed(void *data)
|
||||
static void d3d_set_aspect_ratio(void *data, unsigned aspect_ratio_idx)
|
||||
{
|
||||
d3d_video_t *d3d = (d3d_video_t*)data;
|
||||
enum rarch_display_ctl_state cmd = RARCH_DISPLAY_CTL_NONE;
|
||||
|
||||
switch (aspect_ratio_idx)
|
||||
{
|
||||
case ASPECT_RATIO_SQUARE:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_SQUARE_PIXEL;
|
||||
video_driver_set_viewport_square_pixel();
|
||||
break;
|
||||
|
||||
case ASPECT_RATIO_CORE:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_CORE;
|
||||
video_driver_set_viewport_core();
|
||||
break;
|
||||
|
||||
case ASPECT_RATIO_CONFIG:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_CONFIG;
|
||||
video_driver_set_viewport_config();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (cmd != RARCH_DISPLAY_CTL_NONE)
|
||||
video_driver_ctl(cmd, NULL);
|
||||
|
||||
video_driver_set_aspect_ratio_value(aspectratio_lut[aspect_ratio_idx].value);
|
||||
|
||||
if (!d3d)
|
||||
@ -1129,7 +1125,7 @@ static void *d3d_init(const video_info_t *info,
|
||||
|
||||
input_driver_set(input, input_data);
|
||||
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_SET_OWN_DRIVER, NULL);
|
||||
video_driver_set_own_driver();
|
||||
return d3d;
|
||||
}
|
||||
}
|
||||
@ -1168,8 +1164,8 @@ static void *d3d_init(const video_info_t *info,
|
||||
|
||||
d3d->keep_aspect = info->force_aspect;
|
||||
#ifdef _XBOX
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_SET_OWN_DRIVER, NULL);
|
||||
video_driver_ctl(RARCH_INPUT_CTL_SET_OWN_DRIVER, NULL);
|
||||
video_driver_set_own_driver();
|
||||
video_input_ctl(RARCH_INPUT_CTL_SET_OWN_DRIVER, NULL);
|
||||
#endif
|
||||
|
||||
return d3d;
|
||||
|
@ -398,7 +398,7 @@ static bool xdk_renderchain_render(void *data, const void *frame,
|
||||
settings_t *settings = config_get_ptr();
|
||||
xdk_renderchain_t *chain = (xdk_renderchain_t*)d3d->renderchain_data;
|
||||
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_GET_FRAME_COUNT, &frame_count);
|
||||
frame_count = video_driver_get_frame_count_ptr();
|
||||
|
||||
video_driver_get_size(&width, &height);
|
||||
|
||||
|
@ -961,29 +961,25 @@ static void ctr_set_filtering(void* data, unsigned index, bool smooth)
|
||||
static void ctr_set_aspect_ratio(void* data, unsigned aspect_ratio_idx)
|
||||
{
|
||||
ctr_video_t *ctr = (ctr_video_t*)data;
|
||||
enum rarch_display_ctl_state cmd = RARCH_DISPLAY_CTL_NONE;
|
||||
|
||||
switch (aspect_ratio_idx)
|
||||
{
|
||||
case ASPECT_RATIO_SQUARE:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_SQUARE_PIXEL;
|
||||
video_driver_set_viewport_square_pixel();
|
||||
break;
|
||||
|
||||
case ASPECT_RATIO_CORE:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_CORE;
|
||||
video_driver_set_viewport_core();
|
||||
break;
|
||||
|
||||
case ASPECT_RATIO_CONFIG:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_CONFIG;
|
||||
video_driver_set_viewport_config();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (cmd != RARCH_DISPLAY_CTL_NONE)
|
||||
video_driver_ctl(cmd, NULL);
|
||||
|
||||
video_driver_set_aspect_ratio_value(aspectratio_lut[aspect_ratio_idx].value);
|
||||
|
||||
ctr->keep_aspect = true;
|
||||
|
@ -1402,29 +1402,25 @@ static void exynos_gfx_viewport_info(void *data, struct video_viewport *vp)
|
||||
static void exynos_set_aspect_ratio(void *data, unsigned aspect_ratio_idx)
|
||||
{
|
||||
struct exynos_video *vid = (struct exynos_video*)data;
|
||||
enum rarch_display_ctl_state cmd = RARCH_DISPLAY_CTL_NONE;
|
||||
|
||||
switch (aspect_ratio_idx)
|
||||
{
|
||||
case ASPECT_RATIO_SQUARE:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_SQUARE_PIXEL;
|
||||
video_driver_set_viewport_square_pixel();
|
||||
break;
|
||||
|
||||
case ASPECT_RATIO_CORE:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_CORE;
|
||||
video_driver_set_viewport_core();
|
||||
break;
|
||||
|
||||
case ASPECT_RATIO_CONFIG:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_CONFIG;
|
||||
video_driver_set_viewport_config();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (cmd != RARCH_DISPLAY_CTL_NONE)
|
||||
video_driver_ctl(cmd, NULL);
|
||||
|
||||
video_driver_set_aspect_ratio_value(aspectratio_lut[aspect_ratio_idx].value);
|
||||
vid->aspect_changed = true;
|
||||
}
|
||||
|
@ -1480,7 +1480,7 @@ static INLINE void gl_copy_frame(gl_t *gl, const void *frame,
|
||||
else
|
||||
#endif
|
||||
{
|
||||
bool use_rgba = video_driver_ctl(RARCH_DISPLAY_CTL_SUPPORTS_RGBA, NULL);
|
||||
bool use_rgba = video_driver_supports_rgba();
|
||||
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT,
|
||||
video_pixel_get_alignment(width * gl->base_size));
|
||||
@ -2253,7 +2253,7 @@ static bool resolve_extensions(gl_t *gl, const char *context_ident)
|
||||
RARCH_LOG("[GL]: BGRA8888 extension found for GLES.\n");
|
||||
else
|
||||
{
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_SET_RGBA, NULL);
|
||||
video_driver_set_rgba();
|
||||
RARCH_WARN("[GL]: GLES implementation does not have BGRA8888 extension.\n"
|
||||
"32-bit path will require conversion.\n");
|
||||
}
|
||||
|
@ -472,29 +472,25 @@ static void gx_set_video_mode(void *data, unsigned fbWidth, unsigned lines,
|
||||
static void gx_set_aspect_ratio(void *data, unsigned aspect_ratio_idx)
|
||||
{
|
||||
gx_video_t *gx = (gx_video_t*)data;
|
||||
enum rarch_display_ctl_state cmd = RARCH_DISPLAY_CTL_NONE;
|
||||
|
||||
switch (aspect_ratio_idx)
|
||||
{
|
||||
case ASPECT_RATIO_SQUARE:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_SQUARE_PIXEL;
|
||||
video_driver_set_viewport_square_pixel();
|
||||
break;
|
||||
|
||||
case ASPECT_RATIO_CORE:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_CORE;
|
||||
video_driver_set_viewport_core();
|
||||
break;
|
||||
|
||||
case ASPECT_RATIO_CONFIG:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_CONFIG;
|
||||
video_driver_set_viewport_config();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (cmd != RARCH_DISPLAY_CTL_NONE)
|
||||
video_driver_ctl(cmd, NULL);
|
||||
|
||||
video_driver_set_aspect_ratio_value(
|
||||
aspectratio_lut[aspect_ratio_idx].value);
|
||||
|
||||
|
@ -793,29 +793,25 @@ static void psp_set_filtering(void *data, unsigned index, bool smooth)
|
||||
static void psp_set_aspect_ratio(void *data, unsigned aspect_ratio_idx)
|
||||
{
|
||||
psp1_video_t *psp = (psp1_video_t*)data;
|
||||
enum rarch_display_ctl_state cmd = RARCH_DISPLAY_CTL_NONE;
|
||||
|
||||
switch (aspect_ratio_idx)
|
||||
{
|
||||
case ASPECT_RATIO_SQUARE:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_SQUARE_PIXEL;
|
||||
video_driver_set_viewport_square_pixel();
|
||||
break;
|
||||
|
||||
case ASPECT_RATIO_CORE:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_CORE;
|
||||
video_driver_set_viewport_core();
|
||||
break;
|
||||
|
||||
case ASPECT_RATIO_CONFIG:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_CONFIG;
|
||||
video_driver_set_viewport_config();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (cmd != RARCH_DISPLAY_CTL_NONE)
|
||||
video_driver_ctl(cmd, NULL);
|
||||
|
||||
video_driver_set_aspect_ratio_value(aspectratio_lut[aspect_ratio_idx].value);
|
||||
|
||||
psp->keep_aspect = true;
|
||||
|
@ -629,7 +629,7 @@ static bool sdl2_gfx_read_viewport(void *data, uint8_t *buffer)
|
||||
rarch_perf_init(&sdl2_gfx_read_viewport, "sdl2_gfx_read_viewport");
|
||||
retro_perf_start(&sdl2_gfx_read_viewport);
|
||||
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_CACHED_FRAME_RENDER, NULL);
|
||||
video_driver_cached_frame_render();
|
||||
|
||||
surf = SDL_GetWindowSurface(vid->window);
|
||||
bgr24 = SDL_ConvertSurfaceFormat(surf, SDL_PIXELFORMAT_BGR24, 0);
|
||||
@ -658,29 +658,25 @@ static void sdl2_poke_set_filtering(void *data, unsigned index, bool smooth)
|
||||
static void sdl2_poke_set_aspect_ratio(void *data, unsigned aspect_ratio_idx)
|
||||
{
|
||||
sdl2_video_t *vid = (sdl2_video_t*)data;
|
||||
enum rarch_display_ctl_state cmd = RARCH_DISPLAY_CTL_NONE;
|
||||
|
||||
switch (aspect_ratio_idx)
|
||||
{
|
||||
case ASPECT_RATIO_SQUARE:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_SQUARE_PIXEL;
|
||||
video_driver_set_viewport_square_pixel();
|
||||
break;
|
||||
|
||||
case ASPECT_RATIO_CORE:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_CORE;
|
||||
video_driver_set_viewport_core();
|
||||
break;
|
||||
|
||||
case ASPECT_RATIO_CONFIG:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_CONFIG;
|
||||
video_driver_set_viewport_config();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (cmd != RARCH_DISPLAY_CTL_NONE)
|
||||
video_driver_ctl(cmd, NULL);
|
||||
|
||||
video_driver_set_aspect_ratio_value(aspectratio_lut[aspect_ratio_idx].value);
|
||||
|
||||
vid->video.force_aspect = true;
|
||||
|
@ -489,29 +489,25 @@ static void vita_set_filtering(void *data, unsigned index, bool smooth)
|
||||
static void vita_set_aspect_ratio(void *data, unsigned aspect_ratio_idx)
|
||||
{
|
||||
vita_video_t *vita = (vita_video_t*)data;
|
||||
enum rarch_display_ctl_state cmd = RARCH_DISPLAY_CTL_NONE;
|
||||
|
||||
switch (aspect_ratio_idx)
|
||||
{
|
||||
case ASPECT_RATIO_SQUARE:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_SQUARE_PIXEL;
|
||||
video_driver_set_viewport_square_pixel();
|
||||
break;
|
||||
|
||||
case ASPECT_RATIO_CORE:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_CORE;
|
||||
video_driver_set_viewport_core();
|
||||
break;
|
||||
|
||||
case ASPECT_RATIO_CONFIG:
|
||||
cmd = RARCH_DISPLAY_CTL_SET_VIEWPORT_CONFIG;
|
||||
video_driver_set_viewport_config();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (cmd != RARCH_DISPLAY_CTL_NONE)
|
||||
video_driver_ctl(cmd, NULL);
|
||||
|
||||
video_driver_set_aspect_ratio_value(aspectratio_lut[aspect_ratio_idx].value);
|
||||
|
||||
vita->keep_aspect = true;
|
||||
|
@ -200,7 +200,7 @@ static bool sdl_ctx_set_video_mode(void *data, unsigned width, unsigned height,
|
||||
|
||||
#ifdef HAVE_SDL2
|
||||
if (sdl->g_ctx)
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_SET_VIDEO_CACHE_CONTEXT_ACK, NULL);
|
||||
video_driver_set_video_cache_context_ack();
|
||||
else
|
||||
{
|
||||
sdl->g_ctx = SDL_GL_CreateContext(sdl->g_win);
|
||||
|
@ -102,7 +102,7 @@ void create_gl_context(HWND hwnd, bool *quit)
|
||||
struct retro_hw_render_callback *hwr = NULL;
|
||||
bool debug = false;
|
||||
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_HW_CONTEXT_GET, &hwr);
|
||||
hwr = video_driver_get_hw_context();
|
||||
|
||||
debug = hwr->debug_context;
|
||||
#ifdef _WIN32
|
||||
@ -119,7 +119,7 @@ void create_gl_context(HWND hwnd, bool *quit)
|
||||
if (g_hrc)
|
||||
{
|
||||
RARCH_LOG("[WGL]: Using cached GL context.\n");
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_SET_VIDEO_CACHE_CONTEXT_ACK, NULL);
|
||||
video_driver_set_video_cache_context_ack();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -329,7 +329,7 @@ static void gfx_ctx_wgl_destroy(void *data)
|
||||
glFinish();
|
||||
wglMakeCurrent(NULL, NULL);
|
||||
|
||||
if (!video_driver_ctl(RARCH_DISPLAY_CTL_IS_VIDEO_CACHE_CONTEXT, NULL))
|
||||
if (!video_driver_is_video_cache_context())
|
||||
{
|
||||
if (g_hw_hrc)
|
||||
wglDeleteContext(g_hw_hrc);
|
||||
|
@ -341,7 +341,7 @@ static void android_input_poll_main_cmd(void)
|
||||
runloop_ctl(RUNLOOP_CTL_SET_IDLE, &boolean);
|
||||
#ifdef HAVE_MENU
|
||||
menu_display_ctl(MENU_DISPLAY_CTL_UNSET_STUB_DRAW_FRAME, NULL);
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_UNSET_STUB_FRAME, NULL);
|
||||
video_driver_unset_stub_frame();
|
||||
#endif
|
||||
|
||||
if ((android_app->sensor_state_mask
|
||||
@ -364,7 +364,7 @@ static void android_input_poll_main_cmd(void)
|
||||
runloop_ctl(RUNLOOP_CTL_SET_IDLE, &boolean);
|
||||
#ifdef HAVE_MENU
|
||||
menu_display_ctl(MENU_DISPLAY_CTL_SET_STUB_DRAW_FRAME, NULL);
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_SET_STUB_FRAME, NULL);
|
||||
video_driver_set_stub_frame();
|
||||
#endif
|
||||
|
||||
/* Avoid draining battery while app is not being used. */
|
||||
|
@ -534,7 +534,7 @@ static void xui_render(void *data)
|
||||
const char *label = NULL;
|
||||
unsigned menu_type = 0;
|
||||
|
||||
video_driver_ctl(RARCH_DISPLAY_CTL_GET_FRAME_COUNT, &frame_count);
|
||||
frame_count = video_driver_get_frame_count_ptr();
|
||||
|
||||
menu_display_ctl(MENU_DISPLAY_CTL_WIDTH, &fb_width);
|
||||
menu_display_ctl(MENU_DISPLAY_CTL_MSG_FORCE, &msg_force);
|
||||
|
Loading…
x
Reference in New Issue
Block a user