From ebbbeb0d660e442324c2b563c7b59e9f74ad15e9 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 20 Sep 2018 21:59:38 -0700 Subject: Put user events in a union structure --- OpenAL32/Include/alMain.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'OpenAL32/Include/alMain.h') 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; -- cgit v1.2.3