diff options
Diffstat (limited to 'pugl/detail/mac.m')
-rw-r--r-- | pugl/detail/mac.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pugl/detail/mac.m b/pugl/detail/mac.m index fcf5912..23fad7b 100644 --- a/pugl/detail/mac.m +++ b/pugl/detail/mac.m @@ -991,6 +991,12 @@ puglUpdate(PuglWorld* world, const double timeout) } [world->impl->app sendEvent: ev]; + + if (timeout < 0) { + // Now that we've waited and got an event, set the date to now to + // avoid looping forever + date = [NSDate date]; + } } for (size_t i = 0; i < world->numViews; ++i) { |