From 8aae924d51a16ec6b1bfa8d5812c20d55d747117 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 26 Jun 2026 17:46:18 +0200 Subject: [PATCH] Make play button disabled if playback is at the end. --- profiler/src/profiler/TracyView_Playback.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/profiler/src/profiler/TracyView_Playback.cpp b/profiler/src/profiler/TracyView_Playback.cpp index 9016f81f..087a3c2b 100644 --- a/profiler/src/profiler/TracyView_Playback.cpp +++ b/profiler/src/profiler/TracyView_Playback.cpp @@ -165,10 +165,10 @@ void View::DrawPlayback() ImGui::SameLine(); if( m_playback.pause ) { - if( ImGui::Button( PlaybackWindowButtons[0], ImVec2( bw, 0 ) ) && m_playback.frame != frameImages.size() - 1 ) - { - m_playback.pause = false; - } + const auto disabled = m_playback.frame == frameImages.size() - 1; + if( disabled ) ImGui::BeginDisabled(); + if( ImGui::Button( PlaybackWindowButtons[0], ImVec2( bw, 0 ) ) ) m_playback.pause = false; + if( disabled ) ImGui::EndDisabled(); } else {