mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
Core/Movie: Refactor to class, move to System.
A bit of global state remains (the `header` in `BeginRecordingInput()`) due to unclear lifetime requirements.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user