aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-09-20 21:59:38 -0700
committerChris Robinson <[email protected]>2018-09-20 21:59:38 -0700
commitebbbeb0d660e442324c2b563c7b59e9f74ad15e9 (patch)
treefcddcd84260e58b2ba6c79762d92e286978b8dfc /OpenAL32/Include
parentcb8545346d227ba85a4a98c3897b5cdb1ea86d26 (diff)
Put user events in a union structure
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alMain.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index f1bc4469..86ac49dc 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -750,6 +750,10 @@ struct ALCdevice_struct {
enum {
+ /* End event thread processing. */
+ EventType_KillThread = 0,
+
+ /* User event types. */
EventType_SourceStateChange = 1<<0,
EventType_BufferCompleted = 1<<1,
EventType_Error = 1<<2,
@@ -760,11 +764,17 @@ enum {
typedef struct AsyncEvent {
unsigned int EnumType;
- ALenum Type;
- ALuint ObjectId;
- ALuint Param;
- ALchar Message[1008];
+ union {
+ char dummy;
+ struct {
+ ALenum type;
+ ALuint id;
+ ALuint param;
+ ALchar msg[1008];
+ } user;
+ } u;
} AsyncEvent;
+#define ASYNC_EVENT(t) { t, { 0 } }
struct ALCcontext_struct {
RefCount ref;