mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-26 04:06:32 +00:00
pull in project-slippi/Ishiiruka/commit/29c3127385db6d67806d3a90fc7514e43d114169
add EXI for fetching delay frames
This commit is contained in:
parent
722b986d50
commit
486bc55d8b
2 changed files with 20 additions and 0 deletions
|
@ -2542,6 +2542,20 @@ void CEXISlippi::handleReportGame(u8* payload)
|
|||
#endif
|
||||
}
|
||||
|
||||
void CEXISlippi::prepareDelayResponse()
|
||||
{
|
||||
m_read_queue.clear();
|
||||
m_read_queue.push_back(1); // Indicate this is a real response
|
||||
|
||||
if (NetPlay::IsNetPlayRunning())
|
||||
{
|
||||
// If we are using the old netplay, we don't want to add any additional delay, so return 0
|
||||
m_read_queue.push_back(0);
|
||||
return;
|
||||
}
|
||||
m_read_queue.push_back((u8)SConfig::GetInstance().m_slippiOnlineDelay);
|
||||
}
|
||||
|
||||
void CEXISlippi::DMAWrite(u32 _uAddr, u32 _uSize)
|
||||
{
|
||||
u8* memPtr = Memory::GetPointer(_uAddr);
|
||||
|
@ -2677,6 +2691,9 @@ void CEXISlippi::DMAWrite(u32 _uAddr, u32 _uSize)
|
|||
case CMD_GCT_LOAD:
|
||||
prepareGctLoad(&memPtr[bufLoc + 1]);
|
||||
break;
|
||||
case CMD_GET_DELAY:
|
||||
prepareDelayResponse();
|
||||
break;
|
||||
default:
|
||||
writeToFileAsync(&memPtr[bufLoc], payloadLen + 1, "");
|
||||
SlippiSpectateServer::getInstance().write(&memPtr[bufLoc], payloadLen + 1);
|
||||
|
|
|
@ -81,6 +81,7 @@ private:
|
|||
CMD_FILE_LOAD = 0xD2,
|
||||
CMD_GCT_LENGTH = 0xD3,
|
||||
CMD_GCT_LOAD = 0xD4,
|
||||
CMD_GET_DELAY = 0xD5,
|
||||
};
|
||||
|
||||
enum
|
||||
|
@ -128,6 +129,7 @@ private:
|
|||
{CMD_FILE_LOAD, 0x40},
|
||||
{CMD_GCT_LENGTH, 0x0},
|
||||
{CMD_GCT_LOAD, 0x4},
|
||||
{CMD_GET_DELAY, 0x0},
|
||||
};
|
||||
|
||||
struct WriteMessage
|
||||
|
@ -195,6 +197,7 @@ private:
|
|||
void prepareFileLoad(u8* payload);
|
||||
void prepareGctLength();
|
||||
void prepareGctLoad(u8* payload);
|
||||
void prepareDelayResponse();
|
||||
int getCharColor(u8 charId, u8 teamId);
|
||||
|
||||
void FileWriteThread(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue