[Commits] SDL: SDL_hidapi_ps4.c: add HAVE_ENDPOINTVOLUME_H check to win32 ...

libsdl.org revision control commits-owner at libsdl.org
Fri Sep 28 04:01:42 PDT 2018


details:   https://hg.libsdl.org/SDL/rev/47246ea2f62c
changeset: 12251:47246ea2f62c
user:      Ozkan Sezer <sezeroz at gmail.com>
date:      Fri Sep 28 14:01:40 2018 +0300
description:
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

diffstat:

 src/joystick/hidapi/SDL_hidapi_ps4.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 94e0879b9a6a -r 47246ea2f62c src/joystick/hidapi/SDL_hidapi_ps4.c
--- a/src/joystick/hidapi/SDL_hidapi_ps4.c	Fri Sep 28 13:44:10 2018 +0300
+++ b/src/joystick/hidapi/SDL_hidapi_ps4.c	Fri Sep 28 14:01:40 2018 +0300
@@ -140,7 +140,7 @@
     return crc;
 }
 
-#ifdef __WIN32__
+#if defined(__WIN32__) && defined(HAVE_ENDPOINTVOLUME_H)
 #include "../../core/windows/SDL_windows.h"
 
 #ifndef NTDDI_VISTA
@@ -173,7 +173,7 @@
 {
     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;


More information about the commits mailing list