summaryrefslogtreecommitdiff
path: root/rotord/src
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-12-05 11:16:04 +0000
committerTim Redfern <tim@eclectronics.org>2013-12-05 11:16:04 +0000
commit5d8802e44adf01a1d8dd70dcbd5357d8641f37f9 (patch)
tree7311bf54f73b7c464bfde1e584551a38b173fb9f /rotord/src
parent674173fb17ca25b1b35d6482de6f603cc3d8209c (diff)
xml loader tweak
Diffstat (limited to 'rotord/src')
-rw-r--r--rotord/src/graph.cpp4
-rw-r--r--rotord/src/rotor.h5
2 files changed, 4 insertions, 5 deletions
diff --git a/rotord/src/graph.cpp b/rotord/src/graph.cpp
index f26db6a..a746e6b 100644
--- a/rotord/src/graph.cpp
+++ b/rotord/src/graph.cpp
@@ -526,10 +526,10 @@ bool Graph::parseXml(string media_path){
uint32_t n3=xml.getNumTags("image_input");
for (uint32_t i3=0;i3<n3;i3++){
//handle expandable inputs
- if ((((Image_node*)nodes[nodeID])->image_inputs.size()<i3)&&((Image_node*)nodes[nodeID])->duplicate_inputs){
+ if ((((Image_node*)nodes[nodeID])->image_inputs.size()<=i3)&&((Image_node*)nodes[nodeID])->duplicate_inputs){
string desc=((Image_node*)nodes[nodeID])->image_inputs[0]->description;
string title=((Image_node*)nodes[nodeID])->image_inputs[0]->title;
- while(((Image_node*)nodes[nodeID])->image_inputs.size()<i3){
+ while(((Image_node*)nodes[nodeID])->image_inputs.size()<=i3){
((Image_node*)nodes[nodeID])->create_image_input(desc,title);
}
}
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h
index 50fcef7..e00ebd6 100644
--- a/rotord/src/rotor.h
+++ b/rotord/src/rotor.h
@@ -656,7 +656,7 @@ namespace Rotor {
//awkward, its getting close to the point where we just need access to all of the segments data everywhere?
//we have 2 times here
- if (attributes["mode"]->intVal>=CYCLER_mix&&image_inputs.size()>1){
+ if ((attributes["mode"]->intVal>CYCLER_cut)&&(image_inputs.size()>1)){
int im1=seg%image_inputs.size();
int im2=prevseg%image_inputs.size();
@@ -708,8 +708,7 @@ namespace Rotor {
case CYCLER_max:
image=image.max(i2);
break;
- case CYCLER_mix: //has to be last because of initialser of *in? go figure
-
+ case CYCLER_mix:
image+=i2;
break;
}