mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-23 19:12:14 +03:00
make sleep shorter in poll/sleep getEvent() loops.
This commit is contained in:
parent
a541ebc557
commit
1e988b3839
@ -156,7 +156,7 @@ void CMSWindowsScreen::getEvent(MSG* msg) const
|
||||
{
|
||||
// wait for an event in a cancellable way
|
||||
while (HIWORD(GetQueueStatus(QS_ALLINPUT)) == 0) {
|
||||
CThread::sleep(0.05);
|
||||
CThread::sleep(0.01);
|
||||
}
|
||||
GetMessage(msg, NULL, 0, 0);
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ bool CXWindowsScreen::getEvent(XEvent* xevent) const
|
||||
for (;;) {
|
||||
while (!m_stop && XPending(m_display) == 0) {
|
||||
m_mutex.unlock();
|
||||
CThread::sleep(0.05);
|
||||
CThread::sleep(0.01);
|
||||
m_mutex.lock();
|
||||
}
|
||||
if (m_stop) {
|
||||
|
Loading…
Reference in New Issue
Block a user