Win32: Make timer functions backend independent

This is work towards allowing the Null backend to build for Windows
using the Win32 timer API, without the Win32 backend being enabled.
This commit is contained in:
Camilla Löwy
2021-07-18 20:38:53 +02:00
parent b6834bf2a1
commit bdfe6b09af
3 changed files with 44 additions and 12 deletions
+1 -8
View File
@@ -352,6 +352,7 @@ typedef struct VkWin32SurfaceCreateInfoKHR
typedef VkResult (APIENTRY *PFN_vkCreateWin32SurfaceKHR)(VkInstance,const VkWin32SurfaceCreateInfoKHR*,const VkAllocationCallbacks*,VkSurfaceKHR*);
typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice,uint32_t);
#include "win32_time.h"
#include "win32_thread.h"
#include "win32_joystick.h"
@@ -361,7 +362,6 @@ typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(
#define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowWin32 win32
#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryWin32 win32
#define _GLFW_PLATFORM_LIBRARY_TIMER_STATE _GLFWtimerWin32 win32
#define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorWin32 win32
#define _GLFW_PLATFORM_CURSOR_STATE _GLFWcursorWin32 win32
@@ -518,13 +518,6 @@ typedef struct _GLFWcursorWin32
HCURSOR handle;
} _GLFWcursorWin32;
// Win32-specific global timer data
//
typedef struct _GLFWtimerWin32
{
uint64_t frequency;
} _GLFWtimerWin32;
GLFWbool _glfwRegisterWindowClassWin32(void);
void _glfwUnregisterWindowClassWin32(void);