diff options
Diffstat (limited to 'alc/alcontext.h')
-rw-r--r-- | alc/alcontext.h | 23 |
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 */ |