mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 21:37:42 -07:00
make cross-instance pause work without breaking local wifi connections
This commit is contained in:
parent
b479a2c756
commit
55f50d58f0
@ -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
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user