Fix T51998: Anim player uses 100% CPU
[blender.git] / source / blender / windowmanager / intern / wm_playanim.c
index 0a6e329a7c10c9d2f8e73234ebf2562785874be7..e68f3364b116c625f32bcadf2e48755582219267 100644 (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);
                                }