wgpu: fix sdl2glue not using GetWindowWMInfo properly

Fixes #4127
This commit is contained in:
Laytan
2024-08-26 16:08:14 +02:00
parent 3e0f6bda91
commit f56b895c05

View File

@@ -5,7 +5,9 @@ import "vendor:wgpu"
GetSurface :: proc(instance: wgpu.Instance, window: ^sdl2.Window) -> wgpu.Surface {
window_info: sdl2.SysWMinfo
sdl2.GetVersion(&window_info.version)
sdl2.GetWindowWMInfo(window, &window_info)
if window_info.subsystem == .WAYLAND {
display := window_info.info.wl.display
surface := window_info.info.wl.surface