From 2eb7499b64bee72dfa446f86929be9572988276e Mon Sep 17 00:00:00 2001 From: Zoran Vuckovic Date: Fri, 19 May 2017 19:36:14 +0200 Subject: [PATCH] Alow raw input driver to be used with Direct3D --- gfx/drivers_context/d3d_ctx.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index 8b4cac6683..c13f90d8aa 100644 --- a/gfx/drivers_context/d3d_ctx.cpp +++ b/gfx/drivers_context/d3d_ctx.cpp @@ -25,10 +25,12 @@ #endif #include +#include #include "../drivers/d3d.h" #include "../common/win32_common.h" +#include "../../configuration.h" #include "../../verbosity.h" #include "../../ui/ui_companion_driver.h" @@ -187,6 +189,19 @@ static void gfx_ctx_d3d_input_driver(void *data, *input = xinput ? (const input_driver_t*)&input_xinput : NULL; *input_data = xinput; #else + settings_t *settings = config_get_ptr(); + + if (string_is_equal_fast(settings->arrays.input_driver, "raw", 4)) + { + *input_data = input_winraw.init(name); + if (*input_data) + { + *input = &input_winraw; + dinput = NULL; + return; + } + } + dinput = input_dinput.init(name); *input = dinput ? &input_dinput : NULL; *input_data = dinput;