From f364fe030b76c45ab28b988b5f0a4f1b22fec411 Mon Sep 17 00:00:00 2001 From: bjorn Date: Tue, 18 Aug 2020 21:21:35 -0600 Subject: [PATCH] Make Windows platform functions more private; --- src/core/os.h | 5 ----- src/modules/headset/headset_openxr.c | 9 ++++++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/core/os.h b/src/core/os.h index d7170403..04c86749 100644 --- a/src/core/os.h +++ b/src/core/os.h @@ -163,8 +163,3 @@ void lovrPlatformGetMousePosition(double* x, double* y); void lovrPlatformSetMouseMode(MouseMode mode); bool lovrPlatformIsMouseDown(MouseButton button); bool lovrPlatformIsKeyDown(KeyCode key); -#ifdef _WIN32 -#include -HANDLE lovrPlatformGetWindow(void); -HGLRC lovrPlatformGetContext(void); -#endif diff --git a/src/modules/headset/headset_openxr.c b/src/modules/headset/headset_openxr.c index d735a14d..7619567e 100644 --- a/src/modules/headset/headset_openxr.c +++ b/src/modules/headset/headset_openxr.c @@ -10,18 +10,21 @@ #include #if defined(_WIN32) +#include +HANDLE lovrPlatformGetWindow(void); +HGLRC lovrPlatformGetContext(void); #define XR_USE_GRAPHICS_API_OPENGL #define XR_USE_PLATFORM_WIN32 #define SWAPCHAIN_TYPE XrSwapchainImageOpenGLKHR #elif defined(__ANDROID__) #include #include -#define XR_USE_GRAPHICS_API_OPENGL_ES -#define XR_USE_PLATFORM_ANDROID -#define SWAPCHAIN_TYPE XrSwapchainImageOpenGLESKHR EGLDisplay lovrPlatformGetEGLDisplay(); EGLContext lovrPlatformGetEGLContext(); EGLConfig lovrPlatformGetEGLConfig(); +#define XR_USE_GRAPHICS_API_OPENGL_ES +#define XR_USE_PLATFORM_ANDROID +#define SWAPCHAIN_TYPE XrSwapchainImageOpenGLESKHR #endif #include