diff options
author | Chris Robinson <[email protected]> | 2019-08-01 19:44:09 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-08-01 19:44:09 -0700 |
commit | 33bcced82a1e97811d4212195b6e6ca9cf2242b1 (patch) | |
tree | 9431019a2288668260e92cc1522ba686c04f6e0f /al/event.cpp | |
parent | 4917024c9485d5ed3362ddcb1a0d0f8ee45dfedc (diff) |
Use a smart pointer for holding the context's device
Diffstat (limited to 'al/event.cpp')
-rw-r--r-- | al/event.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/al/event.cpp b/al/event.cpp index 75827b59..06a2e008 100644 --- a/al/event.cpp +++ b/al/event.cpp @@ -120,7 +120,6 @@ void StartEventThrd(ALCcontext *ctx) void StopEventThrd(ALCcontext *ctx) { - static constexpr AsyncEvent kill_evt{EventType_KillThread}; RingBuffer *ring{ctx->mAsyncEvents.get()}; auto evt_data = ring->getWriteVector().first; if(evt_data.len == 0) @@ -130,7 +129,7 @@ void StopEventThrd(ALCcontext *ctx) evt_data = ring->getWriteVector().first; } while(evt_data.len == 0); } - new (evt_data.buf) AsyncEvent{kill_evt}; + new (evt_data.buf) AsyncEvent{EventType_KillThread}; ring->writeAdvance(1); ctx->mEventSem.post(); |