Go through gfx_ctx_input_driver

This commit is contained in:
twinaphex 2015-04-10 08:53:45 +02:00
parent fe69dc2768
commit 0fc92790b3
5 changed files with 15 additions and 5 deletions

View File

@ -566,8 +566,7 @@ static bool d3d_construct(d3d_video_t *d3d,
if (!d3d_initialize(d3d, &d3d->video_info))
return false;
if (input && input_data && ctx && ctx->input_driver)
ctx->input_driver(d3d, input, input_data);
gfx_ctx_input_driver(d3d, input, input_data);
RARCH_LOG("[D3D]: Init complete.\n");
return true;

View File

@ -2414,8 +2414,7 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo
goto error;
#endif
if (input && input_data)
ctx_driver->input_driver(gl, input, input_data);
gfx_ctx_input_driver(gl, input, input_data);
if (settings->video.font_enable)
{

View File

@ -135,7 +135,7 @@ static void *vg_init(const video_info_t *video, const input_driver_t **input, vo
video->smooth ? VG_IMAGE_QUALITY_BETTER : VG_IMAGE_QUALITY_NONANTIALIASED);
vg_set_nonblock_state(vg, !video->vsync);
ctx->input_driver(vg, input, input_data);
gfx_ctx_input_driver(vg, input, input_data);
if (settings->video.font_enable && font_renderer_create_default(&vg->font_driver, &vg->mFontRenderer,
*settings->video.font_path ? settings->video.font_path : NULL, settings->video.font_size))

View File

@ -228,6 +228,15 @@ void gfx_ctx_set_resize(void *data, unsigned width, unsigned height)
ctx->set_resize(data, width, height);
}
void gfx_ctx_input_driver(void *data,
const input_driver_t **input, void **input_data)
{
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();
if (ctx)
ctx->input_driver(data, input, input_data);
}
/**
* find_gfx_ctx_driver_index:
* @ident : Identifier of resampler driver to find.

View File

@ -236,6 +236,9 @@ void gfx_ctx_swap_interval(void *data, unsigned interval);
void gfx_ctx_free(void *data);
void gfx_ctx_input_driver(void *data,
const input_driver_t **input, void **input_data);
retro_proc_address_t gfx_ctx_get_proc_address(const char *sym);
#ifdef __cplusplus