Reverting my windows build fix because it breaks the bug fix committed in r40995
[blender.git] / source / blender / windowmanager / intern / wm_event_system.c
index 4055b6c7d9edad161978f3ccdb419fea304e5fba..074151c9abe52300716214735a951e6be2738c66 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include <math.h>
 
 #include "DNA_listBase.h"
 #include "DNA_screen_types.h"
@@ -46,7 +47,6 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_utildefines.h"
-#include "BLI_math.h"
 
 #include "BKE_blender.h"
 #include "BKE_context.h"
@@ -1791,7 +1791,7 @@ void wm_event_do_handlers(bContext *C)
                                        
                                        if(playing == 0) {
                                                float time = sound_sync_scene(scene);
-                                               if(time != SOUND_ERR_FLT) {
+                                               if(finite(time)) {
                                                        int ncfra = sound_sync_scene(scene) * (float)FPS + 0.5f;
                                                        if(ncfra != scene->r.cfra)      {
                                                                scene->r.cfra = ncfra;