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.
This commit is contained in:
Lioncash
2019-12-05 08:11:52 -05:00
parent d8063e9c54
commit b2a9c36501
6 changed files with 24 additions and 20 deletions

View File

@ -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 (!OpcodeDecoder::g_record_fifo_data)
return;
if (!was_recording)
{
if (!wasRecording)
{
RecordVideoMemory();
}
FifoRecorder::GetInstance().EndFrame(CommandProcessor::fifo.CPBase,
CommandProcessor::fifo.CPEnd);
RecordVideoMemory();
}
FifoRecorder::GetInstance().EndFrame(CommandProcessor::fifo.CPBase, CommandProcessor::fifo.CPEnd);
}
void Renderer::RecordVideoMemory()