mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 22:49:00 +01:00
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:
parent
17b7102b35
commit
3a36bfbcbb
@ -70,7 +70,11 @@ void FifoRecorder::WriteGPCommand(u8* data, u32 size)
|
|||||||
{
|
{
|
||||||
// Assumes data contains all information for the command
|
// Assumes data contains all information for the command
|
||||||
// Calls FifoRecorder::UseMemory
|
// 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
|
// Copy data to buffer
|
||||||
size_t currentSize = m_FifoData.size();
|
size_t currentSize = m_FifoData.size();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user