mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-31 22:42:52 +08:00
video/openvr: Avoid type redefinition errors.
Also, let SDL handle stdint.h and stdbool.h.
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define USE_SDL
|
||||||
#include "openvr_capi.h"
|
#include "openvr_capi.h"
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
@@ -35,7 +36,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
typedef struct SDL_WindowData
|
struct SDL_WindowData
|
||||||
{
|
{
|
||||||
#ifdef SDL_VIDEO_DRIVER_WINDOWS
|
#ifdef SDL_VIDEO_DRIVER_WINDOWS
|
||||||
SDL_Window *window;
|
SDL_Window *window;
|
||||||
@@ -46,9 +47,9 @@ typedef struct SDL_WindowData
|
|||||||
#else
|
#else
|
||||||
int dummy;
|
int dummy;
|
||||||
#endif
|
#endif
|
||||||
} SDL_WindowData;
|
};
|
||||||
|
|
||||||
typedef struct SDL_VideoData {
|
struct SDL_VideoData {
|
||||||
void * openVRLIB;
|
void * openVRLIB;
|
||||||
intptr_t vrtoken;
|
intptr_t vrtoken;
|
||||||
intptr_t (*FN_VR_InitInternal)( EVRInitError *peError, EVRApplicationType eType );
|
intptr_t (*FN_VR_InitInternal)( EVRInitError *peError, EVRApplicationType eType );
|
||||||
@@ -97,13 +98,11 @@ typedef struct SDL_VideoData {
|
|||||||
EGLDisplay eglDpy;
|
EGLDisplay eglDpy;
|
||||||
EGLContext eglCtx;
|
EGLContext eglCtx;
|
||||||
#endif
|
#endif
|
||||||
} SDL_VideoData;
|
};
|
||||||
|
|
||||||
|
struct SDL_DisplayData
|
||||||
typedef struct SDL_DisplayData
|
|
||||||
{
|
{
|
||||||
int dummy;
|
int dummy;
|
||||||
} SDL_DisplayData;
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
#endif // OPENVR_API_EXPORTS
|
#endif // OPENVR_API_EXPORTS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef USE_SDL
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#if defined( __WIN32 )
|
#if defined( __WIN32 )
|
||||||
@@ -53,14 +54,7 @@ typedef char bool;
|
|||||||
#else
|
#else
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif // USE_SDL
|
||||||
typedef uint64_t PropertyContainerHandle_t;
|
|
||||||
typedef uint32_t PropertyTypeTag_t;
|
|
||||||
typedef uint64_t VRActionHandle_t;
|
|
||||||
typedef uint64_t VRActionSetHandle_t;
|
|
||||||
typedef uint64_t VRInputValueHandle_t;
|
|
||||||
typedef uint64_t PathHandle_t;
|
|
||||||
|
|
||||||
|
|
||||||
// OpenVR Constants
|
// OpenVR Constants
|
||||||
|
|
||||||
@@ -1837,10 +1831,6 @@ typedef enum EBlockQueueCreationFlag
|
|||||||
|
|
||||||
// OpenVR typedefs
|
// OpenVR typedefs
|
||||||
|
|
||||||
typedef uint32_t TrackedDeviceIndex_t;
|
|
||||||
typedef uint32_t VRNotificationId;
|
|
||||||
typedef uint64_t VROverlayHandle_t;
|
|
||||||
|
|
||||||
typedef uint32_t PropertyTypeTag_t;
|
typedef uint32_t PropertyTypeTag_t;
|
||||||
typedef uint32_t SpatialAnchorHandle_t;
|
typedef uint32_t SpatialAnchorHandle_t;
|
||||||
typedef void * glSharedTextureHandle_t;
|
typedef void * glSharedTextureHandle_t;
|
||||||
@@ -1851,7 +1841,6 @@ typedef uint32_t DriverId_t;
|
|||||||
typedef uint32_t TrackedDeviceIndex_t;
|
typedef uint32_t TrackedDeviceIndex_t;
|
||||||
typedef uint64_t WebConsoleHandle_t;
|
typedef uint64_t WebConsoleHandle_t;
|
||||||
typedef uint64_t PropertyContainerHandle_t;
|
typedef uint64_t PropertyContainerHandle_t;
|
||||||
typedef uint32_t PropertyTypeTag_t;
|
|
||||||
typedef PropertyContainerHandle_t DriverHandle_t;
|
typedef PropertyContainerHandle_t DriverHandle_t;
|
||||||
typedef uint64_t VRActionHandle_t;
|
typedef uint64_t VRActionHandle_t;
|
||||||
typedef uint64_t VRActionSetHandle_t;
|
typedef uint64_t VRActionSetHandle_t;
|
||||||
|
|||||||
Reference in New Issue
Block a user