aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alError.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-07-28 19:09:07 -0700
committerChris Robinson <[email protected]>2019-07-28 19:09:07 -0700
commit83432a7e5c7f565a08c41bb104ae25286c5fc82b (patch)
treeb16a5b86f037190bac4686adede6078d9928131a /OpenAL32/alError.h
parentcb3e96e75640730b9391f0d2d922eecd9ee2ce79 (diff)
Move some headers out of the Include subdirectory
Diffstat (limited to 'OpenAL32/alError.h')
-rw-r--r--OpenAL32/alError.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenAL32/alError.h b/OpenAL32/alError.h
new file mode 100644
index 00000000..0abd6b26
--- /dev/null
+++ b/OpenAL32/alError.h
@@ -0,0 +1,22 @@
+#ifndef _AL_ERROR_H_
+#define _AL_ERROR_H_
+
+#include "alcmain.h"
+#include "logging.h"
+
+
+extern bool TrapALError;
+
+void alSetError(ALCcontext *context, ALenum errorCode, const char *msg, ...) DECL_FORMAT(printf, 3, 4);
+
+#define SETERR_GOTO(ctx, err, lbl, ...) do { \
+ alSetError((ctx), (err), __VA_ARGS__); \
+ goto lbl; \
+} while(0)
+
+#define SETERR_RETURN(ctx, err, retval, ...) do { \
+ alSetError((ctx), (err), __VA_ARGS__); \
+ return retval; \
+} while(0)
+
+#endif