summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/TAS/TASCheckBox.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2024-01-13 13:14:48 +0100
committerAdmiral H. Curtiss <pikachu025@gmail.com>2024-01-15 08:05:30 +0100
commit95cba6be2beda7fbf4fb597b0aa4cbb8912d8265 (patch)
tree30c854ca14e32320334914d6c48e4f99e0a17233 /Source/Core/DolphinQt/TAS/TASCheckBox.cpp
parentc76dee7807c331582cfb36376329e760eab3f704 (diff)
Core/Movie: Refactor to class, move to System.
A bit of global state remains (the `header` in `BeginRecordingInput()`) due to unclear lifetime requirements.
Diffstat (limited to 'Source/Core/DolphinQt/TAS/TASCheckBox.cpp')
-rw-r--r--Source/Core/DolphinQt/TAS/TASCheckBox.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/DolphinQt/TAS/TASCheckBox.cpp b/Source/Core/DolphinQt/TAS/TASCheckBox.cpp
index bd3865e689..3e7f998339 100644
--- a/Source/Core/DolphinQt/TAS/TASCheckBox.cpp
+++ b/Source/Core/DolphinQt/TAS/TASCheckBox.cpp
@@ -6,6 +6,7 @@
#include <QMouseEvent>
#include "Core/Movie.h"
+#include "Core/System.h"
#include "DolphinQt/QtUtils/QueueOnObject.h"
#include "DolphinQt/TAS/TASInputWindow.h"
@@ -23,7 +24,8 @@ bool TASCheckBox::GetValue() const
if (check_state == Qt::PartiallyChecked)
{
- const u64 frames_elapsed = Movie::GetCurrentFrame() - m_frame_turbo_started;
+ const u64 frames_elapsed =
+ Core::System::GetInstance().GetMovie().GetCurrentFrame() - m_frame_turbo_started;
return static_cast<int>(frames_elapsed % m_turbo_total_frames) < m_turbo_press_frames;
}
@@ -50,7 +52,7 @@ void TASCheckBox::mousePressEvent(QMouseEvent* event)
return;
}
- m_frame_turbo_started = Movie::GetCurrentFrame();
+ m_frame_turbo_started = Core::System::GetInstance().GetMovie().GetCurrentFrame();
m_turbo_press_frames = m_parent->GetTurboPressFrames();
m_turbo_total_frames = m_turbo_press_frames + m_parent->GetTurboReleaseFrames();
setCheckState(Qt::PartiallyChecked);