This commit is contained in:
Arisotura 2023-03-25 10:36:30 +01:00
parent 6d7ebb7686
commit 0f4a81cf90
2 changed files with 7 additions and 2 deletions

View File

@ -509,6 +509,8 @@ void ProcessCommands()
if (cmdheader.Length)
FIFORead<0>(cmddata, cmdheader.Length);
Buffer->unlock();
switch (cmdheader.Command)
{
case Cmd_Pause:
@ -538,6 +540,8 @@ void ProcessCommands()
emuThread->emuRun();
break;
}
Buffer->lock();
}
Buffer->unlock();

View File

@ -838,7 +838,8 @@ void ProcessInput()
if (InputQueue.empty())
{
printf("Netplay: BAD! INPUT QUEUE EMPTY\n");
if (NDS::NumFrames < 4)
printf("Netplay: BAD! INPUT QUEUE EMPTY\n");
return;
}
@ -863,7 +864,7 @@ void ProcessInput()
}
// apply this input frame
printf("[%08d] INPUT=%08X (%08d) (backlog=%d)\n", NDS::NumFrames, frame.KeyMask, frame.FrameNum, InputQueue.size());
if (frame.KeyMask != 0xFFF) printf("[%08d] INPUT=%08X (%08d) (backlog=%d)\n", NDS::NumFrames, frame.KeyMask, frame.FrameNum, InputQueue.size());
NDS::SetKeyMask(frame.KeyMask);
InputQueue.pop();
}