From c4fd8eb475493b85b562ef57d6f3f0ccf0ff05c5 Mon Sep 17 00:00:00 2001 From: TobyAdd <66429886+TobyAdd@users.noreply.github.com> Date: Tue, 8 Oct 2024 19:28:17 +0300 Subject: [PATCH] okk --- src/gui.cpp | 10 +++++----- src/recorder.cpp | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/gui.cpp b/src/gui.cpp index 3c2d1f0..ab9e0e3 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -129,11 +129,11 @@ void gui::RenderMain() { ImGui::PushStyleVar(ImGuiStyleVar_Alpha, 1); imgui_popup::render(); ImGui::SetNextWindowPos({0, 0}); - ImGui::Begin("Replay", 0, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoInputs); - for (auto i : engine.replay2) { - ImGui::Text("%i %i %i %i", i.frame, i.hold, i.button, i.player); - } - ImGui::End(); + // ImGui::Begin("Replay", 0, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoInputs); + // for (auto i : engine.replay2) { + // ImGui::Text("%i %i %i %i", i.frame, i.hold, i.button, i.player); + // } + // ImGui::End(); ImGui::PopStyleVar(); if (isAnimating) { diff --git a/src/recorder.cpp b/src/recorder.cpp index 6a59fd3..6b2ec02 100644 --- a/src/recorder.cpp +++ b/src/recorder.cpp @@ -148,7 +148,9 @@ void Recorder::handle_recording(float dt) { double time = (playLayer->m_gameState.m_levelTime - delay) + extra_time - last_frame_time; if (time >= frame_dt) { if (recorder.sync_audio) { - playLayer->startMusic(); + auto fmod = FMODAudioEngine::get(); + auto offset = (playLayer->m_levelSettings->m_songOffset + playLayer->m_gameState.m_levelTime) * 1000.0; + fmod->setMusicTimeMS(offset, false, 0); } extra_time = time - frame_dt;