Fix T51998: Anim player uses 100% CPU

The loop running with no events didn't sleep.
Now wait for events when paused.
This commit is contained in:
Campbell Barton
2017-07-10 17:37:00 +10:00
parent 2c10e8a3cf
commit 910ab14145

View File

@@ -1428,8 +1428,7 @@ static char *wm_main_playanim_intern(int argc, const char **argv)
ps.next_frame = ps.direction;
while ((hasevent = GHOST_ProcessEvents(g_WS.ghost_system, 0)) || ps.wait2) {
while ((hasevent = GHOST_ProcessEvents(g_WS.ghost_system, ps.wait2d))) {
if (hasevent) {
GHOST_DispatchEvents(g_WS.ghost_system);
}