glfw: fix glfw.Native usage on Linux

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2023-07-03 20:16:14 -07:00
parent efa96b9669
commit 7de8559687

View file

@ -40,6 +40,7 @@ pub const BackendOptions = struct {
pub fn Native(comptime options: BackendOptions) type { pub fn Native(comptime options: BackendOptions) type {
const native = @cImport({ const native = @cImport({
@cDefine("GLFW_INCLUDE_VULKAN", "1"); @cDefine("GLFW_INCLUDE_VULKAN", "1");
@cDefine("GLFW_INCLUDE_NONE", "1");
if (options.win32) @cDefine("GLFW_EXPOSE_NATIVE_WIN32", "1"); if (options.win32) @cDefine("GLFW_EXPOSE_NATIVE_WIN32", "1");
if (options.wgl) @cDefine("GLFW_EXPOSE_NATIVE_WGL", "1"); if (options.wgl) @cDefine("GLFW_EXPOSE_NATIVE_WGL", "1");
if (options.cocoa) @cDefine("GLFW_EXPOSE_NATIVE_COCOA", "1"); if (options.cocoa) @cDefine("GLFW_EXPOSE_NATIVE_COCOA", "1");