Skip to content

Commit

Permalink
okk
Browse files Browse the repository at this point in the history
  • Loading branch information
TobyAdd committed Oct 8, 2024
1 parent f759ab2 commit c4fd8eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 3 additions & 1 deletion src/recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c4fd8eb

Please sign in to comment.