Skip to content

Commit

Permalink
[Mod] Mod Conversion: When converting to IT, clamp maximum tempo to 2…
Browse files Browse the repository at this point in the history
…55 BPM.

git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@21766 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
sagamusix committed Sep 28, 2024
1 parent 3c9214e commit f2f7f8d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mptrack/ModConvert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,8 @@ bool CModDoc::ChangeModType(MODTYPE nNewType)
warnings.set(wFractionalTempo);
}

order.SetDefaultTempo(Clamp(order.GetDefaultTempo(), specs.GetTempoMin(), specs.GetTempoMax()));
// Special case: CModSpecifications for IT allow tempos up to 512 so that legacy modules play correctly.
order.SetDefaultTempo(Clamp(order.GetDefaultTempo(), specs.GetTempoMin(), nNewType == MOD_TYPE_IT ? TEMPO(255, 0) : specs.GetTempoMax()));
order.SetDefaultSpeed(Clamp(order.GetDefaultSpeed(), specs.speedMin, specs.speedMax));
}

Expand Down

0 comments on commit f2f7f8d

Please sign in to comment.