Idle: don't wake up event loop on duplicate event
This commit is contained in:
parent
36c814d26e
commit
2bb01093c0
@ -52,8 +52,9 @@ idle_add(unsigned flags)
|
|||||||
{
|
{
|
||||||
assert(flags != 0);
|
assert(flags != 0);
|
||||||
|
|
||||||
idle_flags |= flags;
|
unsigned old_flags = idle_flags.fetch_or(flags);
|
||||||
|
|
||||||
|
if ((old_flags & flags) != flags)
|
||||||
GlobalEvents::Emit(GlobalEvents::IDLE);
|
GlobalEvents::Emit(GlobalEvents::IDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user