diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-12-05 08:11:52 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-12-05 09:13:03 -0500 |
| commit | b2a9c365011a501ead2b5505d219f9c817b6b7e9 (patch) | |
| tree | 6d099d99970ba0f2a61a61f0de79e22b89931937 /Source/Core/VideoCommon/RenderBase.cpp | |
| parent | d8063e9c543b34ddd646556cf7148c69bffbd816 (diff) | |
VideoCommon/OpcodeDecoding: Move g_bRecordFifoData into namespace
Keeps the global localized with the code that it's primarily related to.
Now it's obvious from a glance what the global variable is affecting.
Diffstat (limited to 'Source/Core/VideoCommon/RenderBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/RenderBase.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 1c193f9fdc..d94eac2c0d 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -65,6 +65,7 @@ #include "VideoCommon/NetPlayChatUI.h" #include "VideoCommon/NetPlayGolfUI.h" #include "VideoCommon/OnScreenDisplay.h" +#include "VideoCommon/OpcodeDecoding.h" #include "VideoCommon/PixelEngine.h" #include "VideoCommon/PixelShaderManager.h" #include "VideoCommon/PostProcessing.h" @@ -880,19 +881,18 @@ std::tuple<int, int> Renderer::CalculateOutputDimensions(int width, int height) void Renderer::CheckFifoRecording() { - bool wasRecording = g_bRecordFifoData; - g_bRecordFifoData = FifoRecorder::GetInstance().IsRecording(); + const bool was_recording = OpcodeDecoder::g_record_fifo_data; + OpcodeDecoder::g_record_fifo_data = FifoRecorder::GetInstance().IsRecording(); - if (g_bRecordFifoData) - { - if (!wasRecording) - { - RecordVideoMemory(); - } + if (!OpcodeDecoder::g_record_fifo_data) + return; - FifoRecorder::GetInstance().EndFrame(CommandProcessor::fifo.CPBase, - CommandProcessor::fifo.CPEnd); + if (!was_recording) + { + RecordVideoMemory(); } + + FifoRecorder::GetInstance().EndFrame(CommandProcessor::fifo.CPBase, CommandProcessor::fifo.CPEnd); } void Renderer::RecordVideoMemory() |
