mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Allow winraw and xinput to work without dinput in Windows
Necessary for Windows ARM32 Desktop (RT)
This commit is contained in:
parent
7ddb876330
commit
6ea79bca36
@ -238,6 +238,7 @@ enum input_driver_enum
|
||||
INPUT_QNX,
|
||||
INPUT_RWEBINPUT,
|
||||
INPUT_DOS,
|
||||
INPUT_WINRAW,
|
||||
INPUT_NULL
|
||||
};
|
||||
|
||||
@ -457,8 +458,10 @@ static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_ANDROID;
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_SDL2;
|
||||
#elif defined(EMSCRIPTEN)
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_RWEBINPUT;
|
||||
#elif defined(_WIN32)
|
||||
#elif defined(_WIN32) && defined(HAVE_DINPUT)
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_DINPUT;
|
||||
#elif defined(_WIN32) && !defined(HAVE_DINPUT) && _WIN32_WINNT >= 0x0501
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_WINRAW;
|
||||
#elif defined(ORBIS)
|
||||
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_PS4;
|
||||
#elif defined(__CELLOS_LV2__)
|
||||
@ -875,6 +878,8 @@ const char *config_get_default_input(void)
|
||||
return "sdl2";
|
||||
case INPUT_DINPUT:
|
||||
return "dinput";
|
||||
case INPUT_WINRAW:
|
||||
return "raw";
|
||||
case INPUT_X:
|
||||
return "x";
|
||||
case INPUT_WAYLAND:
|
||||
|
@ -163,7 +163,9 @@ void d3d_input_driver(const char* input_name, const char* joypad_name, const inp
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DINPUT
|
||||
*input_data = input_dinput.init(joypad_name);
|
||||
*input = *input_data ? &input_dinput : NULL;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
@ -98,6 +98,12 @@ extern void *dinput_wgl;
|
||||
extern void *dinput;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_XINPUT) && !defined(HAVE_DINPUT)
|
||||
#ifndef MAX_PADS
|
||||
#define MAX_PADS 4
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef struct DISPLAYCONFIG_RATIONAL_CUSTOM {
|
||||
UINT32 Numerator;
|
||||
UINT32 Denominator;
|
||||
@ -601,6 +607,10 @@ static LRESULT win32_handle_keyboard_event(HWND hwnd, UINT message,
|
||||
if (input_get_ptr() == &input_dinput && (lparam >> 24 & 0x1))
|
||||
keysym |= 0x80;
|
||||
}
|
||||
#else
|
||||
{
|
||||
/* fix key binding issues on winraw when DirectInput is not available */
|
||||
}
|
||||
#endif
|
||||
/* Key released? */
|
||||
if (message == WM_KEYUP || message == WM_SYSKEYUP)
|
||||
|
Loading…
x
Reference in New Issue
Block a user