mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-10-14 14:50:24 +02:00
Use Common::Flag and Common::Event when possible
Replaces old and simple usages of std::atomic<bool> with Common::Flag (which was introduced after the initial usage), so it's clear that the variable is a flag and because Common::Flag is well tested. This also replaces the ready logic in WiimoteReal with Common::Event since it was basically just unnecessarily reimplementing Common::Event.
This commit is contained in:
1 parent
c6a0e543a5
commit
dca22e08eb
19 files changed
+94
-132
No files matched your search
@@ -19,7 +19,7 @@ AsyncRequests::AsyncRequests() : m_enable(false), m_passthrough(true)
|
||||
void AsyncRequests::PullEventsInternal()
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(m_mutex);
|
||||
m_empty.store(true);
|
||||
m_empty.Set();
|
||||
|
||||
while (!m_queue.empty())
|
||||
{
|
||||
@@ -76,7 +76,7 @@ void AsyncRequests::PushEvent(const AsyncRequests::Event& event, bool blocking)
|
||||
return;
|
||||
}
|
||||
|
||||
m_empty.store(false);
|
||||
m_empty.Clear();
|
||||
m_wake_me_up_again |= blocking;
|
||||
|
||||
if (!m_enable)
|
||||
|
||||
Reference in new issue
Block a user