diff options
author | Chris Robinson <[email protected]> | 2018-09-20 21:59:38 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-09-20 21:59:38 -0700 |
commit | ebbbeb0d660e442324c2b563c7b59e9f74ad15e9 (patch) | |
tree | fcddcd84260e58b2ba6c79762d92e286978b8dfc /Alc/mixvoice.c | |
parent | cb8545346d227ba85a4a98c3897b5cdb1ea86d26 (diff) |
Put user events in a union structure
Diffstat (limited to 'Alc/mixvoice.c')
-rw-r--r-- | Alc/mixvoice.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Alc/mixvoice.c b/Alc/mixvoice.c index a2365886..d019b898 100644 --- a/Alc/mixvoice.c +++ b/Alc/mixvoice.c @@ -197,12 +197,11 @@ void aluInitMixer(void) static void SendAsyncEvent(ALCcontext *context, ALuint enumtype, ALenum type, ALuint objid, ALuint param, const char *msg) { - AsyncEvent evt; - evt.EnumType = enumtype; - evt.Type = type; - evt.ObjectId = objid; - evt.Param = param; - strcpy(evt.Message, msg); + AsyncEvent evt = ASYNC_EVENT(enumtype); + evt.u.user.type = type; + evt.u.user.id = objid; + evt.u.user.param = param; + strcpy(evt.u.user.msg, msg); if(ll_ringbuffer_write(context->AsyncEvents, (const char*)&evt, 1) == 1) alsem_post(&context->EventSem); } |