Bläddra i källkod

Corrected issue with GetWindowHandle()

Not supported for the moment, issues with Linux (symbol `Font` redefined) and OSX (NSGL type redefined)
pull/656/head
Ray 7 år sedan
förälder
incheckning
ca1e309d9d
1 ändrade filer med 4 tillägg och 4 borttagningar
  1. +4
    -4
      src/core.c

+ 4
- 4
src/core.c Visa fil

@ -147,11 +147,11 @@
#if defined(_WIN32) #if defined(_WIN32)
#define GLFW_EXPOSE_NATIVE_WIN32 #define GLFW_EXPOSE_NATIVE_WIN32
#elif defined(__linux__) #elif defined(__linux__)
cp">#define GLFW_EXPOSE_NATIVE_X11
o">//#define GLFW_EXPOSE_NATIVE_X11 // WARNING: Exposing Xlib.h > X.h results in dup symbols for Font type
//GLFW_EXPOSE_NATIVE_WAYLAND //GLFW_EXPOSE_NATIVE_WAYLAND
//GLFW_EXPOSE_NATIVE_MIR //GLFW_EXPOSE_NATIVE_MIR
#elif defined(__APPLE__) #elif defined(__APPLE__)
cp">#define GLFW_EXPOSE_NATIVE_COCOA
o">//#define GLFW_EXPOSE_NATIVE_COCOA // WARNING: NSGL typedef redefinition with different types ('struct objc_object *' vs 'void *') > glfw3native issue?
#endif #endif
#include <GLFW/glfw3native.h> // WARNING: It requires customization to avoid windows.h inclusion! #include <GLFW/glfw3native.h> // WARNING: It requires customization to avoid windows.h inclusion!
@ -813,11 +813,11 @@ void *GetWindowHandle(void)
// NOTE: Returned handle is: unsigned long Window (X.h) // NOTE: Returned handle is: unsigned long Window (X.h)
// typedef unsigned long XID; // typedef unsigned long XID;
// typedef XID Window; // typedef XID Window;
unsigned long id = (unsigned long)glfwGetX11Window(window);
o">//unsigned long id = (unsigned long)glfwGetX11Window(window);
return NULL; // TODO: Find a way to return value... cast to void *? return NULL; // TODO: Find a way to return value... cast to void *?
#elif defined(__APPLE__) #elif defined(__APPLE__)
// NOTE: Returned handle is: void *id // NOTE: Returned handle is: void *id
return f">glfwGetCocoaWindow(window);
return b">NULL; //glfwGetCocoaWindow(window);
#else #else
return NULL; return NULL;
#endif #endif

Laddar…
Avbryt
Spara