mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-03-01 17:02:20 -05:00
VideoCommon/AsyncRequests: Remove now unnecessary SetEnable function. Requests are now always enabled. Call SetPassthrough on initialization to not be racy.
This commit is contained in:
@@ -42,9 +42,6 @@ void AsyncRequests::QueueEvent(Event&& event)
|
||||
{
|
||||
m_empty.Clear();
|
||||
|
||||
if (!m_enable)
|
||||
return;
|
||||
|
||||
m_queue.push(std::move(event));
|
||||
|
||||
auto& system = Core::System::GetInstance();
|
||||
@@ -57,20 +54,6 @@ void AsyncRequests::WaitForEmptyQueue()
|
||||
m_cond.wait(lock, [this] { return m_queue.empty(); });
|
||||
}
|
||||
|
||||
void AsyncRequests::SetEnable(bool enable)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(m_mutex);
|
||||
m_enable = enable;
|
||||
|
||||
if (!enable)
|
||||
{
|
||||
// flush the queue on disabling
|
||||
while (!m_queue.empty())
|
||||
m_queue.pop();
|
||||
m_cond.notify_one();
|
||||
}
|
||||
}
|
||||
|
||||
void AsyncRequests::SetPassthrough(bool enable)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(m_mutex);
|
||||
|
||||
Reference in New Issue
Block a user