Skip to content

Commit

Permalink
Merge pull request #17947 from ANR2ME/adhocctl
Browse files Browse the repository at this point in the history
[Adhocctl] Fix for Metal Gear Acid issue
  • Loading branch information
hrydgard authored Aug 22, 2023
2 parents 1066cac + 3c66523 commit a78c2e6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Core/HLE/sceNetAdhoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2540,12 +2540,8 @@ u32 NetAdhocctl_Disconnect() {
adhocctlCurrentMode = ADHOCCTL_MODE_NONE;
// Notify Event Handlers (even if we weren't connected, not doing this will freeze games like God Eater, which expect this behaviour)
// FIXME: When there are no handler the state will immediately became ADHOCCTL_STATE_DISCONNECTED ?
if (adhocctlHandlers.empty()) {
adhocctlState = ADHOCCTL_STATE_DISCONNECTED;
}
else {
notifyAdhocctlHandlers(ADHOCCTL_EVENT_DISCONNECT, 0);
}
// Note: Metal Gear Acid [2] never register a handler until it's successfully connected to a group and have a connected socket to other player, thus adhocctlHandlers is always empty here.
notifyAdhocctlHandlers(ADHOCCTL_EVENT_DISCONNECT, 0);

// Return Success, some games might ignore returned value and always treat it as success, otherwise repeatedly calling this function
return 0;
Expand Down

0 comments on commit a78c2e6

Please sign in to comment.