diff --git a/src/projectM-engine/PresetMerge.cpp b/src/projectM-engine/PresetMerge.cpp index d7ccdd5c0..69d37d017 100644 --- a/src/projectM-engine/PresetMerge.cpp +++ b/src/projectM-engine/PresetMerge.cpp @@ -7,40 +7,40 @@ void PresetMerger::MergePresets(PresetOutputs & A, PresetOutputs & B, double rat for (PresetOutputs::cshape_container::iterator pos = A.customShapes.begin(); pos != A.customShapes.end(); ++pos) - { - pos->second->a *= ratio; - pos->second->a2 *= ratio; - pos->second->border_a *= ratio; - } - - for (PresetOutputs::cshape_container::iterator pos = B.customShapes.begin(); - pos != B.customShapes.end(); ++pos) { pos->second->a *= invratio; pos->second->a2 *= invratio; pos->second->border_a *= invratio; - A.customShapes[pos->first>>8]=pos->second; + } + + for (PresetOutputs::cshape_container::iterator pos = B.customShapes.begin(); + pos != B.customShapes.end(); ++pos) + { + pos->second->a *= ratio; + pos->second->a2 *= ratio; + pos->second->border_a *= ratio; + A.customShapes[pos->first>>8]=pos->second; } for (PresetOutputs::cwave_container::iterator pos = A.customWaves.begin(); pos != A.customWaves.end(); ++pos) { - pos->second->a *= ratio; + pos->second->a *= invratio; for (int x; x < pos->second->samples; x++) { - pos->second->a_mesh[x]=pos->second->a_mesh[x]*ratio; + pos->second->a_mesh[x]=pos->second->a_mesh[x]*invratio; } } for (PresetOutputs::cwave_container::iterator pos = B.customWaves.begin(); pos != B.customWaves.end(); ++pos) { - pos->second->a *= invratio; + pos->second->a *= ratio; for (int x; x < pos->second->samples; x++) { - pos->second->a_mesh[x]=pos->second->a_mesh[x]*invratio; + pos->second->a_mesh[x]=pos->second->a_mesh[x]*ratio; } - A.customWaves[pos->first>>8]=pos->second; + A.customWaves[pos->first>>8]=pos->second; } diff --git a/src/projectM-engine/console_interface.cpp b/src/projectM-engine/console_interface.cpp index ef11b206f..907c58bd7 100755 --- a/src/projectM-engine/console_interface.cpp +++ b/src/projectM-engine/console_interface.cpp @@ -177,6 +177,8 @@ void projectM::default_key_handler( projectMEvent event, projectMKeycode keycode case PROJECTM_K_r: m_activePreset = m_presetChooser->weightedRandom (this->presetInputs, this->presetOutputs); + presetInputs.frame = 0; + smoothFrame = 0; break; case PROJECTM_K_p: @@ -188,7 +190,8 @@ void projectM::default_key_handler( projectMEvent event, projectMKeycode keycode } m_activePreset = m_presetPos->allocate(this->presetInputs, this->presetOutputs); - + presetInputs.frame = 0; + smoothFrame = 0; break; case PROJECTM_K_l: if (renderer->noSwitch==0)renderer->noSwitch=1; else renderer->noSwitch=0;