An attempt to fix Driver 76 multiplayer #19843
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Potentially fixes games that use Quazal Net-Z #14555 (need someone to test the other games tho)
This game is kinda strange, it initialize Adhocctl instead of Apctl (to connect to an AP), but uses infrastructure syscalls instead of adhoc syscalls, it also tried to get IP from ApctlGetInfo, i wondered what kind of IP should be returned (we currently returning 0.0.0.0) when not connected to any Access Point (unless Adhoc actually have an IP too internally).
Anyway, currently only works on Windows with multiple-instances.
I couldn't get it to works with multiple-instances on Ubuntu (WSL2), and couldn't see much from the logs, because apparently Debug channel is being disabled on non-Windows (at least from the artifacts i tested)
On Android it's even more strange, that the game stuck with 0/0 (100%) FPS, the percentage is still moving so the emulation thread isn't blocked, the game just didn't render anything when entering multiplayer, may be it endlessly retrying something (most likely the sceNetInet* or sceNetApctl* syscall), i guess something inconsistent is happening on Android while other platforms didn't get locked up (not sure about Mac/iOS tho).
PS: This game also uses sceNetInetPoll instead of sceNetInetSelect, and i'm not sure whether our sceNetInetPoll implementation (which under the hood is using select as it's more widely available than poll/epoll) is consistent or not across platforms (ie. the POLL flags stuff)