sensor: Fix build on various Windows compilers with various predefinitions.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 20 May 2020 16:59:35 -0400
changeset 1383952dbeb97b294
parent 13838 02e41b30186f
child 13840 df7f6873371a
sensor: Fix build on various Windows compilers with various predefinitions.
src/sensor/windows/SDL_windowssensor.c
     1.1 --- a/src/sensor/windows/SDL_windowssensor.c	Wed May 20 16:58:33 2020 -0400
     1.2 +++ b/src/sensor/windows/SDL_windowssensor.c	Wed May 20 16:59:35 2020 -0400
     1.3 @@ -36,13 +36,16 @@
     1.4  #include <SensorsApi.h>
     1.5  #include <Sensors.h>
     1.6  
     1.7 +#ifndef CLSID_SensorManager
     1.8  DEFINE_GUID(CLSID_SensorManager, 0x77A1C827, 0xFCD2, 0x4689, 0x89, 0x15, 0x9D, 0x61, 0x3C, 0xC5, 0xFA, 0x3E);
     1.9 +#endif
    1.10 +
    1.11  DEFINE_GUID(IID_SensorManager, 0xBD77DB67, 0x45A8, 0x42DC, 0x8D, 0x00, 0x6D, 0xCF, 0x15, 0xF8, 0x37, 0x7A);
    1.12  DEFINE_GUID(IID_SensorManagerEvents, 0x9B3B0B86, 0x266A, 0x4AAD, 0xB2, 0x1F, 0xFD, 0xE5, 0x50, 0x10, 0x01, 0xB7);
    1.13  DEFINE_GUID(IID_SensorEvents, 0x5D8DCC91, 0x4641, 0x47E7, 0xB7, 0xC3, 0xB7, 0x4F, 0x48, 0xA6, 0xC3, 0x91);
    1.14  
    1.15  /* These constants aren't available in Visual Studio 2015 or earlier Windows SDK  */
    1.16 -#if defined(_MSC_VER) && _MSC_VER <= 1900
    1.17 +#ifndef SENSOR_DATA_TYPE_ANGULAR_VELOCITY_X_DEGREES_PER_SECOND
    1.18  DEFINE_PROPERTYKEY(SENSOR_DATA_TYPE_ANGULAR_VELOCITY_X_DEGREES_PER_SECOND, 0X3F8A69A2, 0X7C5, 0X4E48, 0XA9, 0X65, 0XCD, 0X79, 0X7A, 0XAB, 0X56, 0XD5, 10); //[VT_R8]
    1.19  DEFINE_PROPERTYKEY(SENSOR_DATA_TYPE_ANGULAR_VELOCITY_Y_DEGREES_PER_SECOND, 0X3F8A69A2, 0X7C5, 0X4E48, 0XA9, 0X65, 0XCD, 0X79, 0X7A, 0XAB, 0X56, 0XD5, 11); //[VT_R8]
    1.20  DEFINE_PROPERTYKEY(SENSOR_DATA_TYPE_ANGULAR_VELOCITY_Z_DEGREES_PER_SECOND, 0X3F8A69A2, 0X7C5, 0X4E48, 0XA9, 0X65, 0XCD, 0X79, 0X7A, 0XAB, 0X56, 0XD5, 12); //[VT_R8]