mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Add Wayland build option
This commit is contained in:
@@ -6,7 +6,13 @@
|
||||
# define GLFW_EXPOSE_NATIVE_WIN32
|
||||
# include <GLFW/glfw3native.h>
|
||||
#elif defined __linux__
|
||||
# define GLFW_EXPOSE_NATIVE_X11
|
||||
# ifdef DISPLAY_SERVER_X11
|
||||
# define GLFW_EXPOSE_NATIVE_X11
|
||||
# elif defined DISPLAY_SERVER_WAYLAND
|
||||
# define GLFW_EXPOSE_NATIVE_WAYLAND
|
||||
# else
|
||||
# error "unsupported linux display server"
|
||||
# endif
|
||||
# include <GLFW/glfw3native.h>
|
||||
#endif
|
||||
|
||||
@@ -17,7 +23,11 @@ void* GetMainWindowNative()
|
||||
#ifdef _WIN32
|
||||
return (void*)glfwGetWin32Window( s_glfwWindow );
|
||||
#elif defined __linux__
|
||||
# ifdef DISPLAY_SERVER_X11
|
||||
return (void*)glfwGetX11Window( s_glfwWindow );
|
||||
# elif defined DISPLAY_SERVER_WAYLAND
|
||||
return (void*)glfwGetWaylandWindow( s_glfwWindow );
|
||||
# endif
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user