diff options
author | Chris Robinson <[email protected]> | 2019-07-29 17:54:07 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-07-29 17:54:07 -0700 |
commit | 4c9e18c5a0c29548eb38db636785aa7064713c5d (patch) | |
tree | 7b7904b9a0c33256ec7f094b31c7ed0cdafc487d /al/error.h | |
parent | c2de0782cfec62d6a1c3fe2d409d0f64528ae5f7 (diff) |
Rename al/* sources to avoid camel-case
Diffstat (limited to 'al/error.h')
-rw-r--r-- | al/error.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/al/error.h b/al/error.h new file mode 100644 index 00000000..6408b60c --- /dev/null +++ b/al/error.h @@ -0,0 +1,24 @@ +#ifndef AL_ERROR_H +#define AL_ERROR_H + +#include "AL/al.h" +#include "AL/alc.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 |