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
|
// wait for an event in a cancellable way
|
||||||
while (HIWORD(GetQueueStatus(QS_ALLINPUT)) == 0) {
|
while (HIWORD(GetQueueStatus(QS_ALLINPUT)) == 0) {
|
||||||
CThread::sleep(0.05);
|
CThread::sleep(0.01);
|
||||||
}
|
}
|
||||||
GetMessage(msg, NULL, 0, 0);
|
GetMessage(msg, NULL, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ bool CXWindowsScreen::getEvent(XEvent* xevent) const
|
||||||
for (;;) {
|
for (;;) {
|
||||||
while (!m_stop && XPending(m_display) == 0) {
|
while (!m_stop && XPending(m_display) == 0) {
|
||||||
m_mutex.unlock();
|
m_mutex.unlock();
|
||||||
CThread::sleep(0.05);
|
CThread::sleep(0.01);
|
||||||
m_mutex.lock();
|
m_mutex.lock();
|
||||||
}
|
}
|
||||||
if (m_stop) {
|
if (m_stop) {
|
||||||
|
|
Loading…
Reference in New Issue