mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 10:35:38 +00:00
Fixed build if SDL_JOYSTICK_RAWINPUT_MATCHING isn't enabled
(cherry picked from commit 7c55845c804e2272df8bc111dea5d3e9d11670a0)
This commit is contained in:
parent
e3bfacde3e
commit
c89a460672
|
@ -1112,7 +1112,9 @@ static int RAWINPUT_JoystickOpen(SDL_Joystick *joystick, int device_index)
|
||||||
|
|
||||||
ctx->is_xinput = device->is_xinput;
|
ctx->is_xinput = device->is_xinput;
|
||||||
ctx->is_xboxone = device->is_xboxone;
|
ctx->is_xboxone = device->is_xboxone;
|
||||||
|
#ifdef SDL_JOYSTICK_RAWINPUT_MATCHING
|
||||||
ctx->match_state = 0x0000008800000000ULL; /* Trigger axes at rest */
|
ctx->match_state = 0x0000008800000000ULL; /* Trigger axes at rest */
|
||||||
|
#endif
|
||||||
ctx->preparsed_data = device->preparsed_data;
|
ctx->preparsed_data = device->preparsed_data;
|
||||||
ctx->max_data_length = SDL_HidP_MaxDataListLength(HidP_Input, ctx->preparsed_data);
|
ctx->max_data_length = SDL_HidP_MaxDataListLength(HidP_Input, ctx->preparsed_data);
|
||||||
ctx->data = (HIDP_DATA *)SDL_malloc(ctx->max_data_length * sizeof(*ctx->data));
|
ctx->data = (HIDP_DATA *)SDL_malloc(ctx->max_data_length * sizeof(*ctx->data));
|
||||||
|
|
Loading…
Reference in a new issue