From 8ceefbe4e56cff0d9d31d70a98fdf943de8f9225 Mon Sep 17 00:00:00 2001 From: Natt Akuma Date: Tue, 12 Aug 2025 23:00:37 +0700 Subject: [PATCH] Add tick count to status bar --- src/engine/engine.cpp | 4 ++++ src/engine/engine.h | 1 + src/gui/gui.cpp | 3 +++ 3 files changed, 8 insertions(+) diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index 9aa669974..cd43c987a 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -2450,6 +2450,10 @@ int DivEngine::getTotalTicks() { return totalTicks; } +int DivEngine::getTotalTicksR() { + return totalTicksR; +} + bool DivEngine::getRepeatPattern() { return repeatPattern; } diff --git a/src/engine/engine.h b/src/engine/engine.h index 5594ad359..04c1cc8a5 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -994,6 +994,7 @@ class DivEngine { // get time int getTotalTicks(); // 1/1000000th of a second + int getTotalTicksR(); // song ticks int getTotalSeconds(); // get repeat pattern diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index f97513467..fefdd344d 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -4758,6 +4758,7 @@ bool FurnaceGUI::loop() { ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_PLAYBACK_STAT]); if (e->isPlaying() && settings.playbackTime) { int totalTicks=e->getTotalTicks(); + int totalTicksR=e->getTotalTicksR(); int totalSeconds=e->getTotalSeconds(); String info; @@ -4785,6 +4786,8 @@ bool FurnaceGUI::loop() { info+=fmt::sprintf(_("| Row %d/%d "),oldRow,e->curSubSong->patLen); } + info+=fmt::sprintf(_("| Tick %d "),totalTicksR); + info+=_("| "); if (totalSeconds==0x7fffffff) {