diff options
Diffstat (limited to 'src/win.c')
-rw-r--r-- | src/win.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1150,11 +1150,13 @@ puglUpdate(PuglWorld* world, double timeout) st = puglDispatchWinEvents(world); } else { const double endTime = startTime + timeout - minWaitSeconds; - for (double t = startTime; t < endTime; t = puglGetTime(world)) { + double t = startTime; + while (!st && t < endTime) { if ((st = puglPollWinEvents(world, endTime - t)) || (st = puglDispatchWinEvents(world))) { break; } + t = puglGetTime(world); } } |