sdl2: add openbsd support

This commit is contained in:
Sébastien Marie
2022-02-28 16:17:15 +00:00
parent 737f440c7f
commit 37b4e0de6c
32 changed files with 58 additions and 27 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ when ODIN_OS == .Windows { foreign import lib "SDL2.lib" }
when ODIN_OS == .Linux { foreign import lib "system:SDL2" }
when ODIN_OS == .Darwin { foreign import lib "system:SDL2" }
when ODIN_OS == .FreeBSD { foreign import lib "system:SDL2" }
when ODIN_OS == .OpenBSD { foreign import lib "system:SDL2" }
bool :: distinct b32
#assert(size_of(bool) == size_of(c.int))
@@ -160,4 +161,4 @@ iconv_utf8_ucs2 :: proc "c" (s: string) -> [^]u16 {
iconv_utf8_utf32 :: iconv_utf8_ucs4
iconv_utf8_ucs4 :: proc "c" (s: string) -> [^]rune {
return cast([^]rune)iconv_string("UCS-4-INTERNAL", "UTF-8", cstring(raw_data(s)), len(s)+1)
}
}