Merge pull request #4945 from casdevel/d3d-winraw
Alow raw input driver to be used with Direct3D
This commit is contained in:
commit
8a12bb9f04
|
@ -25,10 +25,12 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <compat/strl.h>
|
#include <compat/strl.h>
|
||||||
|
#include <string/stdstring.h>
|
||||||
|
|
||||||
#include "../drivers/d3d.h"
|
#include "../drivers/d3d.h"
|
||||||
#include "../common/win32_common.h"
|
#include "../common/win32_common.h"
|
||||||
|
|
||||||
|
#include "../../configuration.h"
|
||||||
#include "../../verbosity.h"
|
#include "../../verbosity.h"
|
||||||
#include "../../ui/ui_companion_driver.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 = xinput ? (const input_driver_t*)&input_xinput : NULL;
|
||||||
*input_data = xinput;
|
*input_data = xinput;
|
||||||
#else
|
#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);
|
dinput = input_dinput.init(name);
|
||||||
*input = dinput ? &input_dinput : NULL;
|
*input = dinput ? &input_dinput : NULL;
|
||||||
*input_data = dinput;
|
*input_data = dinput;
|
||||||
|
|
Loading…
Reference in New Issue