From efe0935904fdfac1e7b5fc40ce91aadb7b76c609 Mon Sep 17 00:00:00 2001 From: stfx Date: Mon, 15 Jun 2020 10:31:16 +0200 Subject: [PATCH] Fix compile without DIRECTX --- CMakeLists.txt | 5 ----- src/haptic/windows/SDL_dinputhaptic.c | 4 ---- src/joystick/windows/SDL_dinputjoystick.c | 4 ---- 3 files changed, 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc0fd742d..5604c926e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1523,11 +1523,6 @@ elseif(WINDOWS) if(HAVE_DINPUT_H) set(SDL_JOYSTICK_DINPUT 1) list(APPEND EXTRA_LIBS dinput8) - if(CMAKE_COMPILER_IS_MINGW) - list(APPEND EXTRA_LIBS dxerr8) - elseif (NOT USE_WINSDK_DIRECTX) - list(APPEND EXTRA_LIBS dxerr) - endif() endif() if(HAVE_XINPUT_H) set(SDL_JOYSTICK_XINPUT 1) diff --git a/src/haptic/windows/SDL_dinputhaptic.c b/src/haptic/windows/SDL_dinputhaptic.c index 4b9e5e069..322afe9a6 100644 --- a/src/haptic/windows/SDL_dinputhaptic.c +++ b/src/haptic/windows/SDL_dinputhaptic.c @@ -51,10 +51,6 @@ static LPDIRECTINPUT8 dinput = NULL; static int DI_SetError(const char *str, HRESULT err) { - /* - SDL_SetError("Haptic: %s - %s: %s", str, - DXGetErrorString8A(err), DXGetErrorDescription8A(err)); - */ return SDL_SetError("Haptic error %s", str); } diff --git a/src/joystick/windows/SDL_dinputjoystick.c b/src/joystick/windows/SDL_dinputjoystick.c index 5d777a829..1a042ab38 100644 --- a/src/joystick/windows/SDL_dinputjoystick.c +++ b/src/joystick/windows/SDL_dinputjoystick.c @@ -229,10 +229,6 @@ const DIDATAFORMAT SDL_c_dfDIJoystick2 = { static int SetDIerror(const char *function, HRESULT code) { - /* - return SDL_SetError("%s() [%s]: %s", function, - DXGetErrorString9A(code), DXGetErrorDescription9A(code)); - */ return SDL_SetError("%s() DirectX error 0x%8.8lx", function, code); }