FifoAnalyzer: Double check command size while recording.

Since we now return the value, might as well check it's correct.
This commit is contained in:
Scott Mansell 2015-11-08 19:50:42 +13:00
parent 17b7102b35
commit 3a36bfbcbb
1 changed files with 5 additions and 1 deletions

View File

@ -70,7 +70,11 @@ void FifoRecorder::WriteGPCommand(u8* data, u32 size)
{
// Assumes data contains all information for the command
// Calls FifoRecorder::UseMemory
FifoAnalyzer::AnalyzeCommand(data, FifoAnalyzer::DECODE_RECORD);
u32 analyzed_size = FifoAnalyzer::AnalyzeCommand(data, FifoAnalyzer::DECODE_RECORD);
// Make sure FifoPlayer's command analyzer agrees about the size of the command.
if (analyzed_size != size)
PanicAlert("FifoRecorder: Expected command to be %i bytes long, we were given %i bytes", analyzed_size, size);
// Copy data to buffer
size_t currentSize = m_FifoData.size();