diff options
| author | Mai <mai.iam2048@gmail.com> | 2024-01-13 06:38:39 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-13 06:38:39 -0500 |
| commit | 8760aca8ec400ceb231eaf98193f83172c2c8971 (patch) | |
| tree | 46113c3489477fd1dc76c16629f945670f59abd6 /Source/Core/DolphinQt/FIFO/FIFOPlayerWindow.cpp | |
| parent | d36baf633c9de8d5a3da863ffacca4ba8c88260f (diff) | |
| parent | 637fd4990914831ae164c2f410cf60fe4f0d28c4 (diff) | |
Merge pull request #12500 from AdmiralCurtiss/globals-fiforecorder
FifoRecorder: Move instance to System.
Diffstat (limited to 'Source/Core/DolphinQt/FIFO/FIFOPlayerWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/FIFO/FIFOPlayerWindow.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Source/Core/DolphinQt/FIFO/FIFOPlayerWindow.cpp b/Source/Core/DolphinQt/FIFO/FIFOPlayerWindow.cpp index 6c108477f5..1071a88f8c 100644 --- a/Source/Core/DolphinQt/FIFO/FIFOPlayerWindow.cpp +++ b/Source/Core/DolphinQt/FIFO/FIFOPlayerWindow.cpp @@ -32,8 +32,9 @@ #include "DolphinQt/Resources.h" #include "DolphinQt/Settings.h" -FIFOPlayerWindow::FIFOPlayerWindow(FifoPlayer& fifo_player, QWidget* parent) - : QWidget(parent), m_fifo_player(fifo_player) +FIFOPlayerWindow::FIFOPlayerWindow(FifoPlayer& fifo_player, FifoRecorder& fifo_recorder, + QWidget* parent) + : QWidget(parent), m_fifo_player(fifo_player), m_fifo_recorder(fifo_recorder) { setWindowTitle(tr("FIFO Player")); setWindowIcon(Resources::GetAppIcon()); @@ -229,7 +230,7 @@ void FIFOPlayerWindow::SaveRecording() if (path.isEmpty()) return; - FifoDataFile* file = FifoRecorder::GetInstance().GetRecordedFile(); + FifoDataFile* file = m_fifo_recorder.GetRecordedFile(); bool result = file->Save(path.toStdString()); @@ -242,9 +243,8 @@ void FIFOPlayerWindow::SaveRecording() void FIFOPlayerWindow::StartRecording() { // Start recording - FifoRecorder::GetInstance().StartRecording(m_frame_record_count->value(), [this] { - QueueOnObject(this, [this] { OnRecordingDone(); }); - }); + m_fifo_recorder.StartRecording(m_frame_record_count->value(), + [this] { QueueOnObject(this, [this] { OnRecordingDone(); }); }); UpdateControls(); @@ -253,7 +253,7 @@ void FIFOPlayerWindow::StartRecording() void FIFOPlayerWindow::StopRecording() { - FifoRecorder::GetInstance().StopRecording(); + m_fifo_recorder.StopRecording(); UpdateControls(); UpdateInfo(); @@ -270,7 +270,7 @@ void FIFOPlayerWindow::OnEmulationStarted() void FIFOPlayerWindow::OnEmulationStopped() { // If we have previously been recording, stop now. - if (FifoRecorder::GetInstance().IsRecording()) + if (m_fifo_recorder.IsRecording()) StopRecording(); UpdateControls(); @@ -297,9 +297,9 @@ void FIFOPlayerWindow::UpdateInfo() return; } - if (FifoRecorder::GetInstance().IsRecordingDone()) + if (m_fifo_recorder.IsRecordingDone()) { - FifoDataFile* file = FifoRecorder::GetInstance().GetRecordedFile(); + FifoDataFile* file = m_fifo_recorder.GetRecordedFile(); size_t fifo_bytes = 0; size_t mem_bytes = 0; @@ -316,7 +316,7 @@ void FIFOPlayerWindow::UpdateInfo() return; } - if (Core::IsRunning() && FifoRecorder::GetInstance().IsRecording()) + if (Core::IsRunning() && m_fifo_recorder.IsRecording()) { m_info_label->setText(tr("Recording...")); return; @@ -376,7 +376,7 @@ void FIFOPlayerWindow::UpdateLimits() void FIFOPlayerWindow::UpdateControls() { bool running = Core::IsRunning(); - bool is_recording = FifoRecorder::GetInstance().IsRecording(); + bool is_recording = m_fifo_recorder.IsRecording(); bool is_playing = m_fifo_player.IsPlaying(); m_frame_range_from->setEnabled(is_playing); @@ -399,7 +399,7 @@ void FIFOPlayerWindow::UpdateControls() m_stop->setVisible(running && is_recording); m_record->setVisible(!m_stop->isVisible()); - m_save->setEnabled(FifoRecorder::GetInstance().IsRecordingDone()); + m_save->setEnabled(m_fifo_recorder.IsRecordingDone()); } bool FIFOPlayerWindow::eventFilter(QObject* object, QEvent* event) |
