From b7740861c43eeb641dcbbe04208c1138bd84189d Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 30 Jan 2025 11:42:29 +0000 Subject: [PATCH] Add sdl3_error.odin --- vendor/sdl3/sdl3_error.odin | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 vendor/sdl3/sdl3_error.odin diff --git a/vendor/sdl3/sdl3_error.odin b/vendor/sdl3/sdl3_error.odin new file mode 100644 index 000000000..896894957 --- /dev/null +++ b/vendor/sdl3/sdl3_error.odin @@ -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) } \ No newline at end of file