diff options
author | Ton Roosendaal <ton@blender.org> | 2008-12-21 22:58:25 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-12-21 22:58:25 +0300 |
commit | f1e0cf36f857501b43bc4cf81a845c45dc9f294e (patch) | |
tree | d144602aa1f2bd893a74f1bd54f3d77c017930e1 /source/blender/editors/screen/screen_edit.c | |
parent | 05aa83ad1e580bb793ff529760a81c5595193d97 (diff) |
2.5
Animated screen! (unfinished, now only draws, no animation code yet).
Fun though to see it all work. :)
NOTE: Mac ghost has timer bug, the GHOST_ProcessEvents() doesnt wake
up for timers.
NOTE2: Added while loop in wm_window_process_events() to force Ghost
giving all events to Blender. Timers otherwise don't accumulate...
might be needed to fix in ghost too.
I tend to think to code own timer, this ghost stuff is totally different
per platform.
Diffstat (limited to 'source/blender/editors/screen/screen_edit.c')
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 1022fea605c..4a60fc07a99 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -29,6 +29,7 @@ #include "MEM_guardedalloc.h" #include "DNA_vec_types.h" +#include "DNA_scene_types.h" #include "BLI_blenlib.h" @@ -1263,3 +1264,14 @@ void ed_screen_fullarea(bContext *C) } +void ED_animation_timer(wmWindow *win, int enable) +{ + + if(win->animtimer) + WM_event_remove_window_timer(win, win->animtimer); + win->animtimer= NULL; + + if(enable) + win->animtimer= WM_event_add_window_timer(win, (int)(1000/FPS), (int)(1000/FPS)); +} + |