From fde82e5972fdb072f4c31f068a075451d98af872 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Fri, 28 Sep 2018 14:01:40 +0300 Subject: [PATCH] SDL_hidapi_ps4.c: add HAVE_ENDPOINTVOLUME_H check to win32 volume code. this makes it build with my old toolchain with mingw-w64 1.0.10 headers --- src/joystick/hidapi/SDL_hidapi_ps4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/joystick/hidapi/SDL_hidapi_ps4.c b/src/joystick/hidapi/SDL_hidapi_ps4.c index f33b660ea1b7c..cdd478a07397f 100644 --- a/src/joystick/hidapi/SDL_hidapi_ps4.c +++ b/src/joystick/hidapi/SDL_hidapi_ps4.c @@ -140,7 +140,7 @@ static Uint32 crc32(Uint32 crc, const void *data, int count) return crc; } -#ifdef __WIN32__ +#if defined(__WIN32__) && defined(HAVE_ENDPOINTVOLUME_H) #include "../../core/windows/SDL_windows.h" #ifndef NTDDI_VISTA @@ -173,7 +173,7 @@ static float GetSystemVolume(void) { float volume = -1.0f; /* Return this if we can't get system volume */ -#ifdef __WIN32__ +#if defined(__WIN32__) && defined(HAVE_ENDPOINTVOLUME_H) HRESULT hr = WIN_CoInitialize(); if (SUCCEEDED(hr)) { IMMDeviceEnumerator *pEnumerator;