wgpu: cont. fix sdl2glue on Linux

This commit is contained in:
Laytan Laats
2024-08-26 20:24:26 +02:00
parent ef98aa1fe1
commit 60cd0da2ed
2 changed files with 7 additions and 1 deletions

View File

@@ -41,6 +41,12 @@ MAJOR_VERSION :: 2
MINOR_VERSION :: 0
PATCHLEVEL :: 16
VERSION :: proc "contextless" (ver: ^version) {
ver.major = MAJOR_VERSION
ver.minor = MINOR_VERSION
ver.patch = PATCHLEVEL
}
@(default_calling_convention="c", link_prefix="SDL_")
foreign lib {
GetVersion :: proc(ver: ^version) ---

View File

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