2
0
Эх сурвалжийг харах

vendor:x11/xlib add IS_SUPPORTED constant to match core:time and friends

fleandro 8 сар өмнө
parent
commit
25cdc3736e

+ 1 - 2
vendor/vulkan/_gen/create_vulkan_odin_wrapper.py

@@ -929,8 +929,7 @@ when ODIN_OS == .Windows {
 \t}
 }
 
-// We want to use `vendor:x11/xlib` types so we need to match their build constraints.
-when ODIN_OS == .Linux || ODIN_OS == .FreeBSD || ODIN_OS == .OpenBSD {
+when xlib.IS_SUPPORTED {
 \tXlibDisplay  :: xlib.Display
 \tXlibWindow   :: xlib.Window
 \tXlibVisualID :: xlib.VisualID

+ 1 - 2
vendor/vulkan/structs.odin

@@ -36,8 +36,7 @@ when ODIN_OS == .Windows {
 	}
 }
 
-// We want to use `vendor:x11/xlib` types so we need to match their build constraints.
-when ODIN_OS == .Linux || ODIN_OS == .FreeBSD || ODIN_OS == .OpenBSD {
+when xlib.IS_SUPPORTED {
 	XlibDisplay  :: xlib.Display
 	XlibWindow   :: xlib.Window
 	XlibVisualID :: xlib.VisualID

+ 4 - 0
vendor/x11/xlib/xlib.odin

@@ -0,0 +1,4 @@
+package xlib
+
+// Value, specifying whether `vendor:x11/xlib` is available on the current platform.
+IS_SUPPORTED :: ODIN_OS == .Linux || ODIN_OS == .FreeBSD || ODIN_OS == .OpenBSD