aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alcontext.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-07-30 21:32:05 -0700
committerChris Robinson <[email protected]>2019-07-30 21:32:05 -0700
commitf286c3fa3857579a6c7cf84f32ff953e498577bf (patch)
tree53fa7c741295ecc997aa342178efbfbc401fc7a3 /alc/alcontext.h
parentac554de67d5eb353283c3359bbac15fb4ddad7d9 (diff)
Move another function to a ALCcontext method
Diffstat (limited to 'alc/alcontext.h')
-rw-r--r--alc/alcontext.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/alc/alcontext.h b/alc/alcontext.h
index 9c2ce4a3..833d4c5b 100644
--- a/alc/alcontext.h
+++ b/alc/alcontext.h
@@ -9,16 +9,16 @@
#include "AL/al.h"
#include "AL/alc.h"
#include "AL/alext.h"
-#include "inprogext.h"
-#include "atomic.h"
-#include "vector.h"
-#include "threads.h"
+#include "al/listener.h"
#include "almalloc.h"
#include "alnumeric.h"
-
-#include "al/listener.h"
#include "alu.h"
+#include "atomic.h"
+#include "inprogext.h"
+#include "logging.h"
+#include "threads.h"
+#include "vector.h"
struct ALsource;
@@ -159,9 +159,17 @@ struct ALCcontext {
/** Resumes update processing after being deferred. */
void processUpdates();
+ void setError(ALenum errorCode, const char *msg, ...) DECL_FORMAT(printf, 3, 4);
+
DEF_NEWDEL(ALCcontext)
};
+#define SETERR_RETURN(ctx, err, retval, ...) do { \
+ (ctx)->setError((err), __VA_ARGS__); \
+ return retval; \
+} while(0)
+
+
void UpdateContextProps(ALCcontext *context);
@@ -224,4 +232,7 @@ struct ALcontextProps {
std::atomic<ALcontextProps*> next;
};
+
+extern bool TrapALError;
+
#endif /* ALCONTEXT_H */