make cross-instance pause work without breaking local wifi connections

This commit is contained in:
Arisotura 2023-03-11 23:07:29 +01:00
parent b479a2c756
commit 55f50d58f0
2 changed files with 10 additions and 4 deletions

View File

@ -474,8 +474,6 @@ template<int fifo> void FIFOWrite(void* buf, int len)
void ProcessCommands()
{
memset(CmdRecvFlags, 0, sizeof(CmdRecvFlags));
Buffer->lock();
u8* data = (u8*)Buffer->data();
BufferHeader* header = (BufferHeader*)&data[0];
@ -505,11 +503,15 @@ void ProcessCommands()
if (CommandReadOffset >= kCommandEnd)
CommandReadOffset += kCommandStart - kCommandEnd;
continue;
{
// skip this command
CommandReadOffset += cmdheader.Length;
if (CommandReadOffset >= kCommandEnd)
CommandReadOffset += kCommandStart - kCommandEnd;
}
if (cmdheader.Command >= Cmd_MAX)
continue;
}
// handle this command

View File

@ -691,6 +691,7 @@ void EmuThread::emuRun()
emit windowEmuStart();
AudioInOut::Enable();
IPC::SetActive(true);
IPC::SetActive(true);
}
void EmuThread::initContext()
@ -716,6 +717,7 @@ void EmuThread::emuPause()
AudioInOut::Disable();
IPC::SetActive(false);
IPC::SetActive(false);
}
void EmuThread::emuUnpause()
@ -729,6 +731,7 @@ void EmuThread::emuUnpause()
AudioInOut::Enable();
IPC::SetActive(true);
IPC::SetActive(true);
}
void EmuThread::emuStop()
@ -738,6 +741,7 @@ void EmuThread::emuStop()
AudioInOut::Disable();
IPC::SetActive(false);
IPC::SetActive(false);
}
void EmuThread::emuFrameStep()