Skip to content

Commit

Permalink
Switched X11 and Wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
SlashScreen committed Feb 12, 2025
1 parent 2f82d4e commit 5038134
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions vendor/wgpu/sdl3glue/glue_linux.odin
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ GetSurface :: proc(instance: wgpu.Instance, window: ^sdl3.Window) -> wgpu.Surfac
sdl3.PROP_WINDOW_X11_DISPLAY_POINTER,
nil,
)
surface := sdl3.GetNumberProperty(
x_window := sdl3.GetNumberProperty(
sdl3.GetWindowProperties(window),
sdl3.PROP_WINDOW_X11_WINDOW_NUMBER,
0,
)
return wgpu.InstanceCreateSurface(
instance,
&wgpu.SurfaceDescriptor {
nextInChain = &wgpu.SurfaceDescriptorFromWaylandSurface {
chain = {sType = .SurfaceDescriptorFromWaylandSurface},
nextInChain = &wgpu.SurfaceDescriptorFromXlibWindow {
chain = {sType = .SurfaceDescriptorFromXlibWindow},
display = display,
surface = surface,
window = u64(x_window),
},
},
)
Expand All @@ -33,18 +33,18 @@ GetSurface :: proc(instance: wgpu.Instance, window: ^sdl3.Window) -> wgpu.Surfac
sdl3.PROP_WINDOW_WAYLAND_DISPLAY_POINTER,
nil,
)
surface := sdl3.GetPointerProperty(
w_surface := sdl3.GetPointerProperty(
sdl3.GetWindowProperties(window),
sdl3.PROP_WINDOW_WAYLAND_SURFACE_POINTER,
0,
nil,
)
return wgpu.InstanceCreateSurface(
instance,
&wgpu.SurfaceDescriptor {
nextInChain = &wgpu.SurfaceDescriptorFromXlibWindow {
chain = {sType = .SurfaceDescriptorFromXlibWindow},
nextInChain = &wgpu.SurfaceDescriptorFromWaylandSurface {
chain = {sType = .SurfaceDescriptorFromWaylandSurface},
display = display,
window = u64(window),
surface = u64(w_surface),
},
},
)
Expand Down

0 comments on commit 5038134

Please sign in to comment.