From 83be6daa93e63fade1b21901fddc7120121da210 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 24 Sep 2016 05:56:39 +0200 Subject: [PATCH] Try to prevent input driver from being set with Emscripten EGL context driver if HAVE_SDL2 is defined --- gfx/drivers_context/emscriptenegl_ctx.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index 6b492ea995..dba426ad10 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -228,19 +228,22 @@ static bool gfx_ctx_emscripten_bind_api(void *data, static void gfx_ctx_emscripten_input_driver(void *data, const input_driver_t **input, void **input_data) { - void *rwebinput = NULL; - (void)data; - *input = NULL; + *input = NULL; + *input_data = NULL; - rwebinput = input_rwebinput.init(); +#ifndef HAVE_SDL2 + { + void *rwebinput = input_rwebinput.init(); - if (!rwebinput) - return; + if (!rwebinput) + return; - *input = &input_rwebinput; - *input_data = rwebinput; + *input = &input_rwebinput; + *input_data = rwebinput; + } +#endif } static bool gfx_ctx_emscripten_has_focus(void *data)