diff options
Diffstat (limited to 'OpenAL32/alError.h')
-rw-r--r-- | OpenAL32/alError.h | 22 |
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 |