Headless: Always initialize networking

Without WSAStartup, every sceNetInet socket call failed on Windows with
WSANOTINITIALISED, so no inet test could run there.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-20 08:59:03 +02:00
1 parent cf85e91e62
commit 9dd6d2de10
1 file changed
+4 -8
+4 -8
View File
@@ -840,11 +840,9 @@ int main(int argc, const char* argv[]) {
return 0;
}
// Needed before any sockets can be used (WSAStartup on Windows) - without this, the
// WebSocket debugger silently fails to listen. Only done when requested since headless
// otherwise has no use for networking.
if (cmdLineOptions.DebuggerPort().has_value())
net::Init();
// Needed before any sockets can be used (WSAStartup on Windows), by the WebSocket debugger
// and by tests and games that use sceNetInet.
net::Init();
AutoTestOptions testOptions{};
testOptions.compare = cmdLineOptions.compare.value_or(false);
@@ -1447,9 +1445,7 @@ int main(int argc, const char* argv[]) {
g_VFS.Clear();
g_logManager.Shutdown();
if (cmdLineOptions.DebuggerPort().has_value()) {
net::Shutdown();
}
net::Shutdown();
TimeShutdown();
g_threadManager.Teardown();