1
0
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:
Stone Tickle
2020-09-29 11:00:06 +09:00
parent a9a09ab094
commit a4f83c55a6
3 changed files with 22 additions and 1 deletions
+11 -1
View File
@@ -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