From 729e602bbf825f909193fd130d68ee9eeafb0eae Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Wed, 3 Jul 2013 18:01:07 +0100 Subject: fix scho trails bug --- rotord/rotor.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'rotord/rotor.h') diff --git a/rotord/rotor.h b/rotord/rotor.h index b24ae51..9d4f625 100755 --- a/rotord/rotor.h +++ b/rotord/rotor.h @@ -162,7 +162,7 @@ namespace Rotor { } uint8_t r,g,b; }; - + class Render_status{ public: int id; @@ -919,13 +919,15 @@ namespace Rotor { }; Image *output(const Frame_spec &frame){ //check if cache is valid - if (frame.w!=image->w||frame.h!=image->h){ //or framerate changed? + if (images.size()){ + if (frame.w!=image->w||frame.h!=image->h){ //or framerate changed? //clear cache and start over images.clear(); lastframe=-1; //calculate frame interval //interval=(int)(((duration/number)*frame.framerate)+0.5); //total=interval*number; + } } int thisframe=frame.frame(); //iterate cache and throw out any obsolete frames @@ -1130,9 +1132,9 @@ namespace Rotor { public: Monochrome(){}; Monochrome(map &settings) { - base_settings(settings); + base_settings(settings); }; - ~Monochrome(){ + ~Monochrome(){ }; Monochrome* clone(map &_settings) { return new Monochrome(_settings);}; Image *output(const Frame_spec &frame){ -- cgit v1.2.3