Working example

This commit is contained in:
2025-12-15 12:37:50 -05:00
commit 4ff4b04f06
165 changed files with 94256 additions and 0 deletions

17
sdl3/sdl3_error.odin Normal file
View File

@@ -0,0 +1,17 @@
package sdl3
import "core:c"
@(default_calling_convention="c", link_prefix="SDL_")
foreign lib {
SetError :: proc(fmt: cstring, #c_vararg args: ..any) -> bool ---
SetErrorV :: proc(fmt: cstring, ap: c.va_list) -> bool ---
@(require_results)
OutOfMemory :: proc() -> bool ---
@(require_results)
GetError :: proc() -> cstring ---
ClearError :: proc() -> bool ---
}
Unsupported :: proc "c" () -> bool { return SetError("That operation is not supported") }
InvalidParamError :: proc "c" (param: cstring) -> bool { return SetError("Parameter '%s' is invalid", param) }