[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30461] branches/soc-2010-nexyon/source/ blender: Fix for msvc which not has the round function.
Joerg Mueller
nexyon at gmail.com
Sun Jul 18 10:12:55 CEST 2010
Revision: 30461
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30461
Author: nexyon
Date: 2010-07-18 10:12:50 +0200 (Sun, 18 Jul 2010)
Log Message:
-----------
Fix for msvc which not has the round function.
Modified Paths:
--------------
branches/soc-2010-nexyon/source/blender/editors/screen/screen_ops.c
branches/soc-2010-nexyon/source/blender/windowmanager/intern/wm_event_system.c
Modified: branches/soc-2010-nexyon/source/blender/editors/screen/screen_ops.c
===================================================================
--- branches/soc-2010-nexyon/source/blender/editors/screen/screen_ops.c 2010-07-18 08:07:38 UTC (rev 30460)
+++ branches/soc-2010-nexyon/source/blender/editors/screen/screen_ops.c 2010-07-18 08:12:50 UTC (rev 30461)
@@ -2448,7 +2448,7 @@
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) {
Modified: branches/soc-2010-nexyon/source/blender/windowmanager/intern/wm_event_system.c
===================================================================
--- branches/soc-2010-nexyon/source/blender/windowmanager/intern/wm_event_system.c 2010-07-18 08:07:38 UTC (rev 30460)
+++ branches/soc-2010-nexyon/source/blender/windowmanager/intern/wm_event_system.c 2010-07-18 08:12:50 UTC (rev 30461)
@@ -1598,7 +1598,7 @@
}
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);
More information about the Bf-blender-cvs
mailing list