Merging revision 30461 from my GSoC branch, log: Fix for msvc which not has the round...
authorJoerg Mueller <nexyon@gmail.com>
Sun, 18 Jul 2010 08:19:44 +0000 (08:19 +0000)
committerJoerg Mueller <nexyon@gmail.com>
Sun, 18 Jul 2010 08:19:44 +0000 (08:19 +0000)
source/blender/editors/screen/screen_ops.c
source/blender/windowmanager/intern/wm_event_system.c

index 50a5414b6ff9773b63cfe4313e47c6f56db30a62..232206af6c66ef687ff3f91255f61372a0c732f6 100644 (file)
@@ -2448,7 +2448,7 @@ static int screen_animation_step(bContext *C, wmOperator *op, wmEvent *event)
                else sync= (scene->flag & SCE_FRAME_DROP);
                
                if((scene->audio.flag & AUDIO_SYNC) && !(sad->flag & ANIMPLAY_FLAG_REVERSE) && finite(time = sound_sync_scene(scene)))
                else sync= (scene->flag & SCE_FRAME_DROP);
                
                if((scene->audio.flag & AUDIO_SYNC) && !(sad->flag & ANIMPLAY_FLAG_REVERSE) && finite(time = sound_sync_scene(scene)))
-                       scene->r.cfra = round(time * FPS);
+                       scene->r.cfra = time * FPS + 0.5;
                else
                {
                        if(sync) {
                else
                {
                        if(sync) {
index d6aa8fa325537fcf0b72ad6bbf737f9fac73a722..63dcda3c12eb00a5de8be34919ed70d9798ab05a 100644 (file)
@@ -1598,7 +1598,7 @@ void wm_event_do_handlers(bContext *C)
                                        }
                                        
                                        if(playing == 0) {
                                        }
                                        
                                        if(playing == 0) {
-                                               int ncfra = round(sound_sync_scene(scene) * FPS);
+                                               int ncfra = sound_sync_scene(scene) * FPS + 0.5;
                                                if(ncfra != scene->r.cfra)      {
                                                        scene->r.cfra = ncfra;
                                                        ED_update_for_newframe(C, 1);
                                                if(ncfra != scene->r.cfra)      {
                                                        scene->r.cfra = ncfra;
                                                        ED_update_for_newframe(C, 1);