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

[Adhocctl] Fix for Metal Gear Acid issue #17947

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Changes from all commits
Commits
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
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