Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subframe rollback #285

Draft
wants to merge 83 commits into
base: slippi
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
35a3ce2
Annotations in progress
JulienBernard3383279 Mar 4, 2021
baac7b1
first ver slippi netplay client repo
JulienBernard3383279 Mar 27, 2021
517cf75
Before destroying project by including SlippiNetplay.h in GCAdapter.cpp
JulienBernard3383279 Mar 27, 2021
f93ad16
First SNC->Adapter concept
JulienBernard3383279 Mar 28, 2021
de847b8
Merge remote-tracking branch 'slippi/release/2.3.0' into annotations
JulienBernard3383279 Mar 28, 2021
2aad196
Add offsetUs logging + fix new/no snc
JulienBernard3383279 Mar 28, 2021
fe672e3
add KristalInputJudge + extract bytearray->pad
JulienBernard3383279 Mar 28, 2021
785a7ce
Kristal input judge
JulienBernard3383279 Mar 28, 2021
22b49cc
Cleanup
JulienBernard3383279 Mar 28, 2021
6a37ff5
Pick used controller + log Kristal inputs perception
JulienBernard3383279 Mar 28, 2021
57c8fa0
Fix KIJ and used controller perception
JulienBernard3383279 Mar 29, 2021
bb24939
More annotations
JulienBernard3383279 Apr 1, 2021
7a1a45b
Merge remote-tracking branch 'slippi/release/2.3.0' into annotations
JulienBernard3383279 Apr 17, 2021
dd5dbba
Add trigger checks in KristalInputJudge
JulienBernard3383279 Apr 17, 2021
3b9b24b
Add unconnected enabler methods to InputStabilizer and expose InputSt…
JulienBernard3383279 Apr 17, 2021
eda0889
fix startFrameCount parameter use
JulienBernard3383279 Apr 17, 2021
b88c196
Add note about delay in InputStabilizer
JulienBernard3383279 Apr 17, 2021
02de473
Timing estimation + input versioning + callback architecture
JulienBernard3383279 Apr 18, 2021
7da5ab9
Kristal messages + kristal pad struct/set ordering
JulienBernard3383279 Apr 18, 2021
c835bed
Publish Kristal pad to ASM WIP
JulienBernard3383279 Apr 18, 2021
ec96a40
'''Done.''' there isn't the slightest chance this works first try
JulienBernard3383279 Apr 18, 2021
4ed4d68
Suppress update
JulienBernard3383279 Apr 19, 2021
64d95b8
And so it begins
JulienBernard3383279 Apr 19, 2021
12483bc
Send A + receive A + evaluateTiming logs
JulienBernard3383279 Apr 19, 2021
58f3cd2
Learning about static and translation units: a WIP
JulienBernard3383279 Apr 19, 2021
b96d886
Log any received Slippi message
JulienBernard3383279 Apr 20, 2021
b0fbeac
Fix little endian + switch to X + fix << u8
JulienBernard3383279 Apr 20, 2021
b9b599b
fix << u8 bis
JulienBernard3383279 Apr 20, 2021
ad03f8a
log whether Kristal input is used
JulienBernard3383279 Apr 21, 2021
92e6c51
Fix iterating over stabilizers copy
JulienBernard3383279 Apr 21, 2021
d261d0c
calibrate to delay+2
JulienBernard3383279 Apr 21, 2021
eda5454
comments
JulienBernard3383279 Apr 24, 2021
5f0d49e
Fix local X press logging
JulienBernard3383279 Apr 24, 2021
35a9592
Log kristal input arrival as subframe in our timeline
JulienBernard3383279 Apr 24, 2021
abcc038
More timing logs
JulienBernard3383279 Apr 24, 2021
0819821
temp fix to incrementsSinceOrigin increment when reading WTF was I th…
JulienBernard3383279 Apr 24, 2021
4eae1a6
Now we're getting somewhere
JulienBernard3383279 Apr 24, 2021
5ae13f0
Fix CStick kristal input recognition
JulienBernard3383279 Apr 24, 2021
68d3869
improve comment
JulienBernard3383279 Apr 24, 2021
4b6e9e5
Pass adapted estimated_timing to kristal callback
JulienBernard3383279 Apr 24, 2021
edc585f
note to self: compile before pushing
JulienBernard3383279 Apr 24, 2021
4216ed1
log with floating point precision 2
JulienBernard3383279 Apr 25, 2021
31aedf0
Compensate stabilizer delay in evaluateTiming estimation
JulienBernard3383279 Apr 25, 2021
1ff2992
previousPoll wtf.
JulienBernard3383279 Apr 25, 2021
1aa5773
Fix precision 2 for kristal input usage
JulienBernard3383279 Apr 25, 2021
8423b36
Switch to KRISTAL logs
JulienBernard3383279 Apr 25, 2021
a11e710
log message improvement
JulienBernard3383279 Apr 25, 2021
9ff1c00
INFO_LOG the X tests & fix one SLIPPI_ONLINE->KRISTAL log
JulienBernard3383279 Apr 25, 2021
9134e64
Improve logs for sending inputs
JulienBernard3383279 Apr 25, 2021
f9e542d
improve logging
JulienBernard3383279 Apr 25, 2021
68632f2
Exception handling disabled: guess I'll crash ?
JulienBernard3383279 Apr 25, 2021
a403f6a
add #include <mutex> to attempt to fix linux compilation
JulienBernard3383279 Apr 25, 2021
c0e55a9
add #include <set> to attempt to fix macOS compilation
JulienBernard3383279 Apr 25, 2021
64eabde
Fix pad comms cpp to asm side in progress
JulienBernard3383279 Apr 27, 2021
9926799
whoops.
JulienBernard3383279 Apr 27, 2021
cc2aabc
use a custom pad format conversion function (my sanity is shrinking)
JulienBernard3383279 Apr 27, 2021
de7f92e
fix triggers in kristal pad
JulienBernard3383279 Apr 29, 2021
c1193b7
persist last adapter chan used in kristal callback
JulienBernard3383279 Apr 29, 2021
728ebc9
don't trigger subframe input on light shield update (until we handle …
JulienBernard3383279 Apr 30, 2021
1acfde7
use analog trigger values from latest known slippi input in subframe …
JulienBernard3383279 Apr 30, 2021
8fb1af2
Don't log the useless last 4 bytes of slippi pads
JulienBernard3383279 May 1, 2021
75b2f9d
Clear on release + Input read/write logs
JulienBernard3383279 May 11, 2021
7327cf7
Fix pad_mutex desync ?
JulienBernard3383279 May 17, 2021
7714192
more efficient fix to this desync
JulienBernard3383279 May 18, 2021
21de937
Merge 2.3.1 + small cleaning
JulienBernard3383279 May 21, 2021
b49c60f
update codeset with kristal + slippi v2.3.1
JulienBernard3383279 May 21, 2021
51f7df5
update codeset to hide unranked
JulienBernard3383279 May 21, 2021
1b0fff3
update codeset to restore correct prediction optimization
JulienBernard3383279 May 21, 2021
daaa159
update codeset to uncomment INPUTS_MATCH
JulienBernard3383279 May 22, 2021
c2344da
Disable bReduceTimingDispersion checkbox and set to default true
JulienBernard3383279 May 22, 2021
be85130
Perceive pad origins and adjust kristal pad values
JulienBernard3383279 May 23, 2021
9baeb16
Stop using the last Slippi pad data for triggers instead of the Krist…
JulienBernard3383279 May 23, 2021
166143c
Restore slight trigger press -> Kristal input
JulienBernard3383279 May 23, 2021
0159a35
Test +31 ???
JulienBernard3383279 May 23, 2021
1777835
Test +31 bis
JulienBernard3383279 May 23, 2021
d39a09a
Fix origin initialization and trigger light press kristal perception
JulienBernard3383279 May 24, 2021
16b9acb
Big rollback RE annotations cleaning
JulienBernard3383279 May 24, 2021
85f1360
X input debug logs removed
JulienBernard3383279 May 24, 2021
5b07226
Kristal input judge comment cleaning
JulienBernard3383279 May 24, 2021
7d487bc
Add triggers for: shield release, tap jump from dash, shield drop
JulienBernard3383279 Jun 9, 2021
8395f69
Block crossplay
JulienBernard3383279 Jun 22, 2021
1da00cd
send localKristalVersion and minimumRequiredKristalVersion
JulienBernard3383279 Jun 22, 2021
d392dd5
fix crossplay blocking code
JulienBernard3383279 Jun 22, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
802 changes: 642 additions & 160 deletions Data/Sys/GameSettings/GALE01r2.ini

Large diffs are not rendered by default.

802 changes: 642 additions & 160 deletions Data/Sys/GameSettings/GALJ01r2.ini

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Source/Core/Common/Logging/Log.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ enum LOG_TYPE
SERIALINTERFACE,
SLIPPI,
SLIPPI_ONLINE,
KRISTAL,
SP1,
VIDEO,
VIDEOINTERFACE,
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/Common/Logging/LogManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ LogManager::LogManager()
m_Log[LogTypes::DYNA_REC] = new LogContainer("JIT", "Dynamic Recompiler");
m_Log[LogTypes::EXPANSIONINTERFACE] = new LogContainer("EXI", "Expansion Interface");
m_Log[LogTypes::SLIPPI] = new LogContainer("SLIPPI", "Slippi");
m_Log[LogTypes::SLIPPI_ONLINE] = new LogContainer("SLIPPI_ONLINE", "Slippi Online");
m_Log[LogTypes::SLIPPI_ONLINE] = new LogContainer("SLIPPI_ONLINE", "Slippi Online");
m_Log[LogTypes::KRISTAL] = new LogContainer("KRISTAL", "Kristal");
m_Log[LogTypes::FILEMON] = new LogContainer("FileMon", "File Monitor");
m_Log[LogTypes::GDB_STUB] = new LogContainer("GDB_STUB", "GDB Stub");
m_Log[LogTypes::GPFIFO] = new LogContainer("GP", "GPFifo");
Expand Down
4 changes: 3 additions & 1 deletion Source/Core/Common/Version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
//#else
//" " BUILD_TYPE_STR " " SCM_DESC_STR;
//#endif
#define SLIPPI_REV_STR "2.3.1"

#define SLIPPI_REV_STR "3.0.0"

#ifdef IS_PLAYBACK
const std::string scm_rev_str = "Faster Melee - Slippi (" SLIPPI_REV_STR ") - Playback";
#else
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ void SConfig::LoadCoreSettings(IniFile &ini)
core->Get("TimeStretching", &bTimeStretching, false);
core->Get("RSHACK", &bRSHACK, false);
core->Get("Latency", &iLatency, 0);
core->Get("ReduceTimingDispersion", &bReduceTimingDispersion, false);
core->Get("ReduceTimingDispersion", &bReduceTimingDispersion, true);
core->Get("SlippiEnableSpectator", &m_enableSpectator, true);
core->Get("SlippiSpectatorLocalPort", &m_spectator_local_port, 51441);
core->Get("SlippiOnlineDelay", &m_slippiOnlineDelay, 2);
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/ConfigManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ struct SConfig : NonCopyable
bool bQoSEnabled = true;
bool bAdapterWarning = true;

bool bReduceTimingDispersion = false;
bool bReduceTimingDispersion = true;

MeleeLagReductionCode iLagReductionCode = MELEE_LAG_REDUCTION_CODE_UNSET;
bool bHasShownLagReductionWarning = false;
Expand Down
136 changes: 124 additions & 12 deletions Source/Core/Core/HW/EXI_DeviceSlippi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1545,6 +1545,15 @@ void CEXISlippi::handleOnlineInputs(u8 *payload)
m_read_queue.clear();

int32_t frame = payload[0] << 24 | payload[1] << 16 | payload[2] << 8 | payload[3];
u8 delay = payload[4];

{
std::ostringstream oss;
oss << "In frame " << frame << " delay " << (int)delay << " pad ";
for (int i = 0; i < SLIPPI_PAD_FULL_SIZE; i++)
oss << (int)payload[5 + i] << " ";
INFO_LOG(KRISTAL, oss.str().c_str());
}

if (frame == 1)
{
Expand All @@ -1564,7 +1573,7 @@ void CEXISlippi::handleOnlineInputs(u8 *payload)
// Reset character selections as they are no longer needed
localSelections.Reset();
if (slippi_netplay)
slippi_netplay->StartSlippiGame();
slippi_netplay->StartSlippiGame(delay);
}

if (isDisconnected())
Expand All @@ -1577,12 +1586,39 @@ void CEXISlippi::handleOnlineInputs(u8 *payload)
{
// Send inputs that have not yet been acked
slippi_netplay->SendSlippiPad(nullptr);
// Tell the input stabilizers not to take the last poll into account
slippi_netplay->DecrementInputStabilizerFrameCounts();
m_read_queue.push_back(2);
return;
}

// calls SendSlippiPad
handleSendInputs(payload);
prepareOpponentInputs(payload);

{
std::ostringstream oss;
oss << "Out result " << (int)m_read_queue[0] << " count " << (int)m_read_queue[1];
oss << " frame "
<< ((((int)m_read_queue[2]) << 24) + (((int)m_read_queue[3]) << 16) + (((int)m_read_queue[4]) << 8) +
((int)m_read_queue[5]));
oss << " Kristal [ ";
for (int i = 0; i < SLIPPI_PAD_FULL_SIZE; i++)
oss << (int)m_read_queue[2 + 12 + 7*(int)SLIPPI_PAD_FULL_SIZE*3 + i] << " ";
oss << "] Slippi ";

for (int j = 0; j < 7; j++)
{
oss << "[ ";
for (int i = 0; i < SLIPPI_PAD_FULL_SIZE; i++)
{
oss << (int)m_read_queue[2 + 12 + j * SLIPPI_PAD_FULL_SIZE + i] << " ";
}
oss << "] ";
}

INFO_LOG(KRISTAL, oss.str().c_str());
}
}

bool CEXISlippi::shouldSkipOnlineFrame(s32 frame)
Expand Down Expand Up @@ -1708,6 +1744,8 @@ void CEXISlippi::prepareOpponentInputs(u8 *payload)

int32_t latestFrameRead[SLIPPI_REMOTE_PLAYER_MAX]{};

int32_t latestFrameSent[SLIPPI_REMOTE_PLAYER_MAX] {};

// Get pad data for each remote player and write each of their latest frame nums to the buf
for (int i = 0; i < remotePlayerCount; i++)
{
Expand All @@ -1724,6 +1762,14 @@ void CEXISlippi::prepareOpponentInputs(u8 *payload)
latestFrameRead[i] = latestFrame;
appendWordToBuffer(&m_read_queue, *(u32 *)&latestFrame);
// INFO_LOG(SLIPPI_ONLINE, "Sending frame num %d for pIdx %d (offset: %d)", latestFrame, i, offset[i]);

// DEBUG
if (results[i]->data[offset[i]] & 4)
{
std::ostringstream oss;
oss << "X pressed for frame " << latestFrame;
WARN_LOG(KRISTAL, oss.str().c_str());
}
}
// Send the current frame for any unused player slots.
for (int i = remotePlayerCount; i < SLIPPI_REMOTE_PLAYER_MAX; i++)
Expand All @@ -1742,21 +1788,77 @@ void CEXISlippi::prepareOpponentInputs(u8 *payload)
{
auto txStart = results[i]->data.begin() + offset[i];
auto txEnd = results[i]->data.end();
tx.insert(tx.end(), txStart, txEnd);
tx.insert(tx.end(), txStart, txEnd); //* Inversion de sens ?
}

tx.resize(SLIPPI_PAD_FULL_SIZE * ROLLBACK_MAX_FRAMES, 0);

m_read_queue.insert(m_read_queue.end(), tx.begin(), tx.end());

// TODO log
/*ERROR_LOG(SLIPPI_ONLINE, "EXI: [%d] %X %X %X %X %X %X %X %X", results[i]->latestFrame, m_read_queue[5],
m_read_queue[6],
m_read_queue[7], m_read_queue[8], m_read_queue[9], m_read_queue[10], m_read_queue[11],
m_read_queue[12]);*/
}

for (int i = 0; i < SLIPPI_REMOTE_PLAYER_MAX; i++)
{
if (i < remotePlayerCount)
{
// Add Kristal input
std::pair<bool, SlippiNetplayClient::KristalPad> kristalPad =
slippi_netplay->GetKristalInput(frame, i); // No more than the current frame

if (kristalPad.first)
{
if (kristalPad.second.subframe >
(float)results[i]->latestFrame) // No less than the latest frame for which we have inputs
{
// More recent, use the Kristal input

auto slippiPad = results[i]->data.begin() + offset[i];

m_read_queue.insert(m_read_queue.end(), kristalPad.second.pad,
kristalPad.second.pad + SLIPPI_PAD_DATA_SIZE);
m_read_queue.insert(m_read_queue.end(), SLIPPI_PAD_FULL_SIZE - SLIPPI_PAD_DATA_SIZE, 0);

std::ostringstream oss;
oss << std::fixed << std::setprecision(2) << "Kristal input was used for frame " << frame
<< " subframe " << kristalPad.second.subframe << " latest known frame "
<< results[i]->latestFrame;
ERROR_LOG(KRISTAL, oss.str().c_str());
oss.str("");
oss << "Kristal " << (int)kristalPad.second.pad[0] << " " << (int)kristalPad.second.pad[1] << " "
<< (int)kristalPad.second.pad[2] << " " << (int)kristalPad.second.pad[3] << " "
<< (int)kristalPad.second.pad[4] << " " << (int)kristalPad.second.pad[5] << " "
<< (int)kristalPad.second.pad[6] << " " << (int)kristalPad.second.pad[7] << " ";
ERROR_LOG(KRISTAL, oss.str().c_str());
oss.str("");
oss << "Slippi " << (int)slippiPad[0] << " " << (int)slippiPad[1] << " " << (int)slippiPad[2] << " "
<< (int)slippiPad[3] << " " << (int)slippiPad[4] << " " << (int)slippiPad[5] << " "
<< (int)slippiPad[6] << " " << (int)slippiPad[7];
ERROR_LOG(KRISTAL, oss.str().c_str());
}
else
kristalPad.first = false;
}
if (!kristalPad.first)
{
m_read_queue.insert(m_read_queue.end(), results[i]->data.begin(),
results[i]->data.begin() + SLIPPI_PAD_FULL_SIZE);
}
}
else
{
m_read_queue.insert(m_read_queue.end(), SLIPPI_PAD_FULL_SIZE, 0);
}
}

// the latest read frame instead of the current frame must be passed to avoid nuking inputs
// that are > latest read frame < current frame and arrived during this function
int32_t minFrameRead = *std::min_element(latestFrameRead, latestFrameRead + SLIPPI_REMOTE_PLAYER_MAX);
slippi_netplay->DropOldRemoteInputs(minFrameRead);

// ERROR_LOG(SLIPPI_ONLINE, "EXI: [%d] %X %X %X %X %X %X %X %X", latestFrame, m_read_queue[5], m_read_queue[6],
// m_read_queue[7], m_read_queue[8], m_read_queue[9], m_read_queue[10], m_read_queue[11], m_read_queue[12]);
}

void CEXISlippi::handleCaptureSavestate(u8 *payload)
Expand Down Expand Up @@ -2236,6 +2338,15 @@ void CEXISlippi::prepareOnlineMatchState()

if (localPlayerReady && remotePlayersReady)
{
auto status = slippi_netplay->GetSlippiConnectStatus();
bool isConnected = status == SlippiNetplayClient::SlippiConnectStatus::NET_CONNECT_STATUS_CONNECTED;
if (!isConnected)
{
handleConnectionCleanup();
prepareOnlineMatchState(); // run again with new state
return;
}

auto isDecider = slippi_netplay->IsDecider();
u8 remotePlayerCount = matchmaking->RemotePlayerCount();
auto matchInfo = slippi_netplay->GetMatchInfo();
Expand Down Expand Up @@ -2961,6 +3072,7 @@ void CEXISlippi::DMAWrite(u32 _uAddr, u32 _uSize)
while (bufLoc < _uSize)
{
byte = memPtr[bufLoc];

//INFO_LOG(SLIPPI, "EXI SLIPPI: Loc: %d, Size: %d, Cmd: 0x%x", bufLoc, _uSize, byte);
if (!payloadSizes.count(byte))
{
Expand All @@ -2977,24 +3089,24 @@ void CEXISlippi::DMAWrite(u32 _uAddr, u32 _uSize)
m_slippiserver->write(&memPtr[bufLoc], payloadLen + 1);
m_slippiserver->endGame();
break;
case CMD_FRAME_BOOKEND:
g_needInputForFrame = true;
writeToFileAsync(&memPtr[bufLoc], payloadLen + 1, "");
m_slippiserver->write(&memPtr[bufLoc], payloadLen + 1);
break;
case CMD_PREPARE_REPLAY:
// log.open("log.txt");
prepareGameInfo(&memPtr[bufLoc + 1]);
break;
case CMD_READ_FRAME:
prepareFrameData(&memPtr[bufLoc + 1]);
break;
case CMD_FRAME_BOOKEND:
g_needInputForFrame = true;
writeToFileAsync(&memPtr[bufLoc], payloadLen + 1, "");
m_slippiserver->write(&memPtr[bufLoc], payloadLen + 1);
case CMD_IS_FILE_READY:
prepareIsFileReady();
break;
case CMD_IS_STOCK_STEAL:
prepareIsStockSteal(&memPtr[bufLoc + 1]);
break;
case CMD_IS_FILE_READY:
prepareIsFileReady();
break;
case CMD_GET_GECKO_CODES:
m_read_queue.clear();
m_read_queue.insert(m_read_queue.begin(), geckoList.begin(), geckoList.end());
Expand Down
6 changes: 4 additions & 2 deletions Source/Core/Core/HW/EXI_DeviceSlippi.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class CEXISlippi : public IEXIDevice

void DMAWrite(u32 _uAddr, u32 _uSize) override;
void DMARead(u32 addr, u32 size) override;

bool IsPresent() const override;

private:
Expand Down Expand Up @@ -179,6 +179,7 @@ class CEXISlippi : public IEXIDevice
void handleOnlineInputs(u8 *payload);
void prepareOpponentInputs(u8 *payload);
void handleSendInputs(u8 *payload);

void handleCaptureSavestate(u8 *payload);
void handleLoadSavestate(u8 *payload);
void handleNameEntryAutoComplete(u8 *payload);
Expand Down Expand Up @@ -232,7 +233,8 @@ class CEXISlippi : public IEXIDevice
std::vector<u8> playbackSavestatePayload;
std::vector<u8> geckoList;

u32 stallFrameCount = 0;
u32 stallFrameCount = 0;

bool isConnectionStalled = false;

std::vector<u8> m_read_queue;
Expand Down
6 changes: 3 additions & 3 deletions Source/Core/Core/HW/SI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
#include "InputCommon/ControllerInterface/ControllerInterface.h"
#include "InputCommon/GCAdapter.h"
#include "InputCommon/GCPadStatus.h"
#include "InputCommon/InputStabilizer.h"

static std::vector<InputStabilizer> stabilizers(MAX_SI_CHANNELS, InputStabilizer());

namespace SerialInterface
{

std::vector<InputStabilizer> stabilizers(MAX_SI_CHANNELS, InputStabilizer());

static CoreTiming::EventType* changeDevice;
static CoreTiming::EventType* et_transfer_pending;
static CoreTiming::EventType* et_send_netplay_inputs;
Expand Down
3 changes: 3 additions & 0 deletions Source/Core/Core/HW/SI.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <memory>
#include "Common/CommonTypes.h"
#include <chrono>
#include "InputCommon/InputStabilizer.h"

class PointerWrap;
class ISIDevice;
Expand Down Expand Up @@ -45,4 +46,6 @@ u32 GetPollXLines();

extern std::chrono::time_point<std::chrono::high_resolution_clock> last_si_read;

extern std::vector<InputStabilizer> stabilizers;

} // end of namespace SerialInterface
2 changes: 2 additions & 0 deletions Source/Core/Core/HW/SI_DeviceGCController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "Core/Movie.h"
#include "Core/NetPlayProto.h"
#include "InputCommon/GCPadStatus.h"
#include "InputCommon/GCAdapter.h"

// --- standard GameCube controller ---
CSIDevice_GCController::CSIDevice_GCController(SIDevices device, int _iDeviceNumber)
Expand Down Expand Up @@ -322,6 +323,7 @@ void CSIDevice_GCController::SendCommand(u32 _Cmd, u8 _Poll)
{
m_Mode = command.Parameter2;
INFO_LOG(SERIALINTERFACE, "PAD %i set to mode %i", ISIDevice::m_iDeviceNumber, m_Mode);
GCAdapter::InformPadModeSet(ISIDevice::m_iDeviceNumber);
}
}
break;
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/NetPlayProto.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ enum
NP_MSG_SLIPPI_MATCH_SELECTIONS = 0x82,
NP_MSG_SLIPPI_CONN_SELECTED = 0x83,
NP_MSG_SLIPPI_CHAT_MESSAGE = 0x84,
NP_MSG_KRISTAL_PAD = 0x8E,

NP_MSG_START_GAME = 0xA0,
NP_MSG_CHANGE_GAME = 0xA1,
Expand Down
Loading