From 96e0ec3b427ca0457901e4b7dcd17b5a682366dd Mon Sep 17 00:00:00 2001 From: RedPanda4552 Date: Thu, 23 Nov 2023 23:19:06 -0500 Subject: [PATCH] Fix another comment --- pcsx2/SIO/Pad/Pad.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pcsx2/SIO/Pad/Pad.cpp b/pcsx2/SIO/Pad/Pad.cpp index 8c2ce7a7d792be..08f47486b65a9b 100644 --- a/pcsx2/SIO/Pad/Pad.cpp +++ b/pcsx2/SIO/Pad/Pad.cpp @@ -103,12 +103,14 @@ void Pad::LoadConfig(const SettingsInterface& si) const ControllerInfo* ci = GetControllerInfo(EmuConfig.Pad.Ports[i].Type); pxAssert(ci); - // If a pad is not yet constructed, at minimum place a NotConnected pad in the slot. - // Do not abort the for loop - If there are pad settings, we want those to be applied to the slot. PadBase* pad = Pad::GetPad(i); + // If pad pointer is not occupied yet, type in settings no longer matches the current type, or a multitap was slotted in/out, + // then reconstruct a new pad. if (!pad || pad->GetType() != ci->type || (mtapPort0Changed && (i <= 4 && i != 1)) || (mtapPort1Changed && (i >= 5 || i == 1))) { + // Create the new pad. If the VM is in any kind of running state at all, set eject ticks so the PS2 will think + // there was some kind of pad ejection event and properly detect the new one, and properly initiate its config sequence. pad = Pad::CreatePad(i, ci->type, (VMManager::GetState() != VMState::Shutdown ? Pad::DEFAULT_EJECT_TICKS : 0)); pxAssert(pad); }