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
This commit is contained in:
Ozkan Sezer 2018-09-28 14:01:40 +03:00
parent cf7d64f266
commit fde82e5972
1 changed files with 2 additions and 2 deletions

View File

@ -140,7 +140,7 @@ static Uint32 crc32(Uint32 crc, const void *data, int count)
return crc; return crc;
} }
#ifdef __WIN32__ #if defined(__WIN32__) && defined(HAVE_ENDPOINTVOLUME_H)
#include "../../core/windows/SDL_windows.h" #include "../../core/windows/SDL_windows.h"
#ifndef NTDDI_VISTA #ifndef NTDDI_VISTA
@ -173,7 +173,7 @@ static float GetSystemVolume(void)
{ {
float volume = -1.0f; /* Return this if we can't get system volume */ 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(); HRESULT hr = WIN_CoInitialize();
if (SUCCEEDED(hr)) { if (SUCCEEDED(hr)) {
IMMDeviceEnumerator *pEnumerator; IMMDeviceEnumerator *pEnumerator;