fix build with --disable-directx

This commit is contained in:
Ozkan Sezer 2021-01-17 05:00:50 +03:00
parent 2ea393bd83
commit f3835702d3
4 changed files with 107 additions and 101 deletions

View file

@ -44,7 +44,9 @@
#include "../../core/windows/SDL_hid.h"
#include "../hidapi/SDL_hidapijoystick_c.h"
#ifdef HAVE_XINPUT_H
#define SDL_JOYSTICK_RAWINPUT_XINPUT
#endif
#ifdef SDL_WINDOWS10_SDK
#define SDL_JOYSTICK_RAWINPUT_WGI
#endif
@ -1216,9 +1218,8 @@ RAWINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uin
{
#if defined(SDL_JOYSTICK_RAWINPUT_WGI) || defined(SDL_JOYSTICK_RAWINPUT_XINPUT)
RAWINPUT_DeviceContext *ctx = joystick->hwdata;
#endif
SDL_bool rumbled = SDL_FALSE;
#endif
#ifdef SDL_JOYSTICK_RAWINPUT_WGI
if (!rumbled && ctx->wgi_correlated) {