Skip to content

Commit

Permalink
wgpu: cont. fix sdl2glue on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
laytan committed Aug 26, 2024
1 parent ef98aa1 commit 60cd0da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions vendor/sdl2/sdl2.odin
Original file line number Diff line number Diff line change
Expand Up @@ -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) ---
Expand Down
2 changes: 1 addition & 1 deletion vendor/wgpu/sdl2glue/glue_linux.odin
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 60cd0da

Please sign in to comment.