mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-16 22:23:07 +00:00
Wake pacing queue waiters when Pacer is being destroyed
This commit is contained in:
parent
5970ca49e9
commit
cae666b834
1 changed files with 6 additions and 0 deletions
|
@ -47,6 +47,7 @@ Pacer::~Pacer()
|
||||||
|
|
||||||
// Stop the V-sync thread
|
// Stop the V-sync thread
|
||||||
if (m_VsyncThread != nullptr) {
|
if (m_VsyncThread != nullptr) {
|
||||||
|
m_PacingQueueNotEmpty.wakeAll();
|
||||||
m_VsyncSignalled.wakeAll();
|
m_VsyncSignalled.wakeAll();
|
||||||
SDL_WaitThread(m_VsyncThread, nullptr);
|
SDL_WaitThread(m_VsyncThread, nullptr);
|
||||||
}
|
}
|
||||||
|
@ -244,6 +245,11 @@ void Pacer::handleVsync(int timeUntilNextVsyncMillis)
|
||||||
m_FrameQueueLock.unlock();
|
m_FrameQueueLock.unlock();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_Stopping) {
|
||||||
|
m_FrameQueueLock.unlock();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Place the first frame on the render queue
|
// Place the first frame on the render queue
|
||||||
|
|
Loading…
Reference in a new issue