From 646db5b8be18c05e24dc42593b9ad809159e78c7 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Sun, 22 Nov 2015 09:54:25 -0600 Subject: [PATCH] Disable controller UI while playing a trace --- src/xenia/gpu/trace_viewer.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/xenia/gpu/trace_viewer.cc b/src/xenia/gpu/trace_viewer.cc index 03710af28..2314d9c70 100644 --- a/src/xenia/gpu/trace_viewer.cc +++ b/src/xenia/gpu/trace_viewer.cc @@ -192,9 +192,16 @@ void TraceViewer::DrawControllerUI() { if (ImGui::IsItemHovered()) { ImGui::SetTooltip("Skip to last frame"); } + if (player_->playing_trace()) { + // Don't allow the user to change the frame index just yet... + // TODO: Find a way to disable the slider below. + target_frame = player_->current_frame_index(); + } + ImGui::SameLine(); ImGui::SliderInt("", &target_frame, 0, player_->frame_count() - 1); - if (target_frame != player_->current_frame_index()) { + if (target_frame != player_->current_frame_index() && + !player_->playing_trace()) { player_->SeekFrame(target_frame); } ImGui::End();