SDL_hidapi_ps4.c: add HAVE_ENDPOINTVOLUME_H check to win32 volume code.
authorOzkan Sezer <sezeroz@gmail.com>
Fri, 28 Sep 2018 14:01:40 +0300
changeset 1225147246ea2f62c
parent 12250 94e0879b9a6a
child 12252 9a334644da3e
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
     1.1 --- a/src/joystick/hidapi/SDL_hidapi_ps4.c	Fri Sep 28 13:44:10 2018 +0300
     1.2 +++ b/src/joystick/hidapi/SDL_hidapi_ps4.c	Fri Sep 28 14:01:40 2018 +0300
     1.3 @@ -140,7 +140,7 @@
     1.4      return crc;
     1.5  }
     1.6  
     1.7 -#ifdef __WIN32__
     1.8 +#if defined(__WIN32__) && defined(HAVE_ENDPOINTVOLUME_H)
     1.9  #include "../../core/windows/SDL_windows.h"
    1.10  
    1.11  #ifndef NTDDI_VISTA
    1.12 @@ -173,7 +173,7 @@
    1.13  {
    1.14      float volume = -1.0f;    /* Return this if we can't get system volume */
    1.15  
    1.16 -#ifdef __WIN32__
    1.17 +#if defined(__WIN32__) && defined(HAVE_ENDPOINTVOLUME_H)
    1.18      HRESULT hr = WIN_CoInitialize();
    1.19      if (SUCCEEDED(hr)) {
    1.20          IMMDeviceEnumerator *pEnumerator;