Fixed mingw-w64 build
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
diff --git a/configure b/configure
index 841fa59..523c1c6 100755
--- a/configure
+++ b/configure
@@ -24299,6 +24299,13 @@ $as_echo "#define SDL_JOYSTICK_WINMM 1" >>confdefs.h
SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
have_joystick=yes
fi
+ if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
+
+$as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h
+
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
+ SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
+ fi
if test x$enable_haptic = xyes; then
if test x$have_dinput = xyes -o x$have_xinput = xyes; then
if test x$have_xinput = xyes; then
diff --git a/configure.in b/configure.in
index 3adebab..03e23c8 100644
--- a/configure.in
+++ b/configure.in
@@ -3631,6 +3631,11 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
have_joystick=yes
fi
+ if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
+ AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
+ SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
+ fi
if test x$enable_haptic = xyes; then
if test x$have_dinput = xyes -o x$have_xinput = xyes; then
if test x$have_xinput = xyes; then
diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c
index 153cee7..7a37039 100644
--- a/src/render/direct3d11/SDL_render_d3d11.c
+++ b/src/render/direct3d11/SDL_render_d3d11.c
@@ -2223,8 +2223,6 @@ static int
D3D11_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * srcrect, const SDL_FRect * dstrect)
{
- D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata;
- D3D11_TextureData *textureData = (D3D11_TextureData *) texture->driverdata;
float minu, maxu, minv, maxv;
Float4 color;
VertexPositionColor vertices[4];
@@ -2296,8 +2294,6 @@ D3D11_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture,
const SDL_Rect * srcrect, const SDL_FRect * dstrect,
const double angle, const SDL_FPoint * center, const SDL_RendererFlip flip)
{
- D3D11_RenderData *rendererData = (D3D11_RenderData *) renderer->driverdata;
- D3D11_TextureData *textureData = (D3D11_TextureData *) texture->driverdata;
float minu, maxu, minv, maxv;
Float4 color;
Float4X4 modelMatrix;