mirror of https://github.com/encounter/SDL.git
Fixed build on older Visual Studio, enable new features on newer Visual Studio
This commit is contained in:
parent
589d636bb9
commit
0f374b069b
|
@ -198,7 +198,9 @@ typedef unsigned int uintptr_t;
|
||||||
#define SDL_JOYSTICK_HIDAPI 1
|
#define SDL_JOYSTICK_HIDAPI 1
|
||||||
#define SDL_JOYSTICK_RAWINPUT 1
|
#define SDL_JOYSTICK_RAWINPUT 1
|
||||||
#define SDL_JOYSTICK_VIRTUAL 1
|
#define SDL_JOYSTICK_VIRTUAL 1
|
||||||
/*#define SDL_JOYSTICK_WGI 1*/ /* This requires Windows SDK 10.0.16299.0 */
|
#if _MSC_VER >= 1911
|
||||||
|
#define SDL_JOYSTICK_WGI 1 /* This requires Windows SDK 10.0.16299.0 or newer */
|
||||||
|
#endif
|
||||||
#define SDL_JOYSTICK_XINPUT 1
|
#define SDL_JOYSTICK_XINPUT 1
|
||||||
#define SDL_HAPTIC_DINPUT 1
|
#define SDL_HAPTIC_DINPUT 1
|
||||||
#define SDL_HAPTIC_XINPUT 1
|
#define SDL_HAPTIC_XINPUT 1
|
||||||
|
@ -222,8 +224,8 @@ typedef unsigned int uintptr_t;
|
||||||
#ifndef SDL_VIDEO_RENDER_D3D
|
#ifndef SDL_VIDEO_RENDER_D3D
|
||||||
#define SDL_VIDEO_RENDER_D3D 1
|
#define SDL_VIDEO_RENDER_D3D 1
|
||||||
#endif
|
#endif
|
||||||
#ifndef SDL_VIDEO_RENDER_D3D11
|
#if _MSC_VER >= 1911
|
||||||
#define SDL_VIDEO_RENDER_D3D11 0
|
#define SDL_VIDEO_RENDER_D3D11 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Enable OpenGL support */
|
/* Enable OpenGL support */
|
||||||
|
|
|
@ -41,6 +41,13 @@ DEFINE_GUID(IID_SensorManager, 0xBD77DB67, 0x45A8, 0x42DC, 0x8D, 0x00, 0x6D, 0xC
|
||||||
DEFINE_GUID(IID_SensorManagerEvents, 0x9B3B0B86, 0x266A, 0x4AAD, 0xB2, 0x1F, 0xFD, 0xE5, 0x50, 0x10, 0x01, 0xB7);
|
DEFINE_GUID(IID_SensorManagerEvents, 0x9B3B0B86, 0x266A, 0x4AAD, 0xB2, 0x1F, 0xFD, 0xE5, 0x50, 0x10, 0x01, 0xB7);
|
||||||
DEFINE_GUID(IID_SensorEvents, 0x5D8DCC91, 0x4641, 0x47E7, 0xB7, 0xC3, 0xB7, 0x4F, 0x48, 0xA6, 0xC3, 0x91);
|
DEFINE_GUID(IID_SensorEvents, 0x5D8DCC91, 0x4641, 0x47E7, 0xB7, 0xC3, 0xB7, 0x4F, 0x48, 0xA6, 0xC3, 0x91);
|
||||||
|
|
||||||
|
/* These constants aren't available in Visual Studio 2015 or earlier Windows SDK */
|
||||||
|
#if defined(_MSC_VER) && _MSC_VER <= 1900
|
||||||
|
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]
|
||||||
|
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]
|
||||||
|
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]
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
SDL_SensorID id;
|
SDL_SensorID id;
|
||||||
|
|
Loading…
Reference in New Issue