diff --git a/tools/mid2agb/agb.cpp b/tools/mid2agb/agb.cpp index d4d79f133..caa6f0ecd 100644 --- a/tools/mid2agb/agb.cpp +++ b/tools/mid2agb/agb.cpp @@ -18,6 +18,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#include #include #include #include @@ -503,7 +504,7 @@ void PrintAgbTrack(std::vector& events) ResetTrackVars(); break; case EventType::Tempo: - PrintByte("TEMPO , %u*%s_tbs/2", 60000000 / event.param2, g_asmLabel.c_str()); + PrintByte("TEMPO , %u*%s_tbs/2", static_cast(round(60000000.0f / static_cast(event.param2))), g_asmLabel.c_str()); PrintWait(event.time); break; case EventType::InstrumentChange: