mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Workaround to prevent some games from not retrying to connect on non-Windows system. This will also make a more cross-platform behavior on Windows/Linux/BSD
This commit is contained in:
parent
00a0885509
commit
c34efa3e3e
1 changed files with 6 additions and 2 deletions
|
@ -3615,9 +3615,13 @@ int NetAdhocPtp_Connect(int id, int timeout, int flag, bool allowForcedConnect)
|
||||||
return hleLogDebug(SCENET, ERROR_NET_ADHOC_WOULD_BLOCK, "would block");
|
return hleLogDebug(SCENET, ERROR_NET_ADHOC_WOULD_BLOCK, "would block");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// No connection could be made because the target device actively refused it.
|
// No connection could be made because the target device actively refused it (on Windows/Linux/Android), or no one listening on the remote address (on Linux/Android).
|
||||||
else if (errorcode == ECONNREFUSED) {
|
else if (errorcode == ECONNREFUSED) {
|
||||||
return hleLogError(SCENET, ERROR_NET_ADHOC_CONNECTION_REFUSED, "connection refused");
|
// Workaround for ERROR_NET_ADHOC_CONNECTION_REFUSED to be more cross-platform, since there is no way to simulate ERROR_NET_ADHOC_CONNECTION_REFUSED properly on Windows
|
||||||
|
if (flag)
|
||||||
|
return hleLogError(SCENET, ERROR_NET_ADHOC_WOULD_BLOCK, "connection refused workaround");
|
||||||
|
else
|
||||||
|
return hleLogError(SCENET, ERROR_NET_ADHOC_TIMEOUT, "connection refused workaround");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue