Skip to content

Commit

Permalink
Win32: resolve some symbols re-definition of windows.h in glfw3native.h
Browse files Browse the repository at this point in the history
This reflects GLFW's fix: glfw/glfw#1348

This enables to build with a external GLFW containing the
following fix:

* glfw/glfw@05f6c13

Currently, glfw3native.h of the internal GLFW is customized at
2feea87

This fix is compatible with the current customized glfw3native.h.

This fix enables us to update it to the latest and remove the
customization.
  • Loading branch information
daipom committed Aug 17, 2022
1 parent 95d3a6a commit 35f9a97
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/rcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,12 @@

// Support retrieving native window handlers
#if defined(_WIN32)
typedef void *PVOID;
typedef PVOID HANDLE;
typedef HANDLE HWND;
#define GLFW_EXPOSE_NATIVE_WIN32
#include "GLFW/glfw3native.h" // WARNING: It requires customization to avoid windows.h inclusion!
#define GLFW_NATIVE_INCLUDE_NONE // To avoid some symbols re-definition in windows.h
#include "GLFW/glfw3native.h"

#if defined(SUPPORT_WINMM_HIGHRES_TIMER) && !defined(SUPPORT_BUSY_WAIT_LOOP)
// NOTE: Those functions require linking with winmm library
Expand Down

0 comments on commit 35f9a97

Please sign in to comment.